Skip to content

Commit 68527ff

Browse files
wingyplusbradfitz
authored andcommitted
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 <[email protected]> Run-TryBot: Brad Fitzpatrick <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
1 parent cfbe3cf commit 68527ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/runtime/extern.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ func Caller(skip int) (pc uintptr, file string, line int, ok bool) {
176176
// what it called, so that CallersFrames can see if it "called"
177177
// sigpanic, and possibly a PC for skipPleaseUseCallersFrames.
178178
var rpc [3]uintptr
179-
if callers(1+skip-1, rpc[:]) < 2 {
179+
if callers(skip, rpc[:]) < 2 {
180180
return
181181
}
182182
var stackExpander stackExpander

0 commit comments

Comments
 (0)