Skip to content

Commit

Permalink
Update stack.go
Browse files Browse the repository at this point in the history
  • Loading branch information
donnie4w committed Oct 1, 2024
1 parent 24a0ade commit e81e91f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions logger/stack.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ func collectCallStack(depth int, formatfunc bool, stack *callStack, recursion bo
}
var f runtime.Frame
var ok bool
if f, ok = m.Get(pcs); !ok {
if f, ok = m.Get(pcs[0]); !ok {
f, _ = runtime.CallersFrames([]uintptr{pcs[0]}).Next()
m.Put(pcs, f)
m.Put(pcs[0], f)
}
if formatfunc {
stack.PushWithFunc(f.File, f.Line, funcname(f.Func.Name()))
Expand Down

0 comments on commit e81e91f

Please sign in to comment.