Commit 68527ff4 authored by Thanabodee Charoenpiriyakij's avatar Thanabodee Charoenpiriyakij Committed by Brad Fitzpatrick

runtime: remove +1-1 when asking PC values

Fixes #26437

Change-Id: Id47b3bcc23ea7b7b17b55dd96b5830c48fd8d53d
Reviewed-on: https://go-review.googlesource.com/124895Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent cfbe3cfb
......@@ -176,7 +176,7 @@ func Caller(skip int) (pc uintptr, file string, line int, ok bool) {
// what it called, so that CallersFrames can see if it "called"
// sigpanic, and possibly a PC for skipPleaseUseCallersFrames.
var rpc [3]uintptr
if callers(1+skip-1, rpc[:]) < 2 {
if callers(skip, rpc[:]) < 2 {
return
}
var stackExpander stackExpander
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment