Skip to content

Commit

Permalink
Fix iteration bug in GetOrNewStackTrace() (getsentry#257)
Browse files Browse the repository at this point in the history
Fixes: getsentry#256
Update GetOrNewStackTrace() to iterate over stacktracer.StackTrace() elements
  • Loading branch information
bfields06 authored and kamilogorek committed May 13, 2019
1 parent 919484f commit c977f96
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions stacktrace.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ func GetOrNewStacktrace(err error, skip int, context int, appPackagePrefixes []s
return NewStacktrace(skip+1, context, appPackagePrefixes)
}
var frames []*StacktraceFrame
for f := range stacktrace.StackTrace() {
pc := uintptr(f) - 1
for _, f := range stacktrace.StackTrace() {
pc := uintptr(f.PC) - 1
fn := runtime.FuncForPC(pc)
var fName string
var file string
Expand Down

0 comments on commit c977f96

Please sign in to comment.