Skip to content

Commit

Permalink
fix derp
Browse files Browse the repository at this point in the history
Signed-off-by: He Xian <hexian000@outlook.com>
  • Loading branch information
hexian000 committed Apr 20, 2024
1 parent e8dfbfb commit fd3c8f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion v2/eventlog/eventlog.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func (p *recent) Add(timestamp time.Time, message string) {
}
if len(p.elements) < cap(p.elements) {
p.elements = append(p.elements, entry{timestamp, message, 1})
p.lastpos = len(p.elements)
p.lastpos = (p.lastpos + 1) % cap(p.elements)
return
}
p.elements[p.lastpos] = entry{timestamp, message, 1}
Expand Down

0 comments on commit fd3c8f3

Please sign in to comment.