mirror of
https://github.com/golang/go.git
synced 2025-05-30 19:52:53 +00:00
runtime: remove +1-1 when asking PC values
Fixes #26437 Change-Id: Id47b3bcc23ea7b7b17b55dd96b5830c48fd8d53d Reviewed-on: https://go-review.googlesource.com/124895 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
cfbe3cfbeb
commit
68527ff4fb
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user