Skip to content

Commit 43891ab

Browse files
fix(subscriber): fix off-by-one indexing for callsites (#391)
Co-authored-by: Eliza Weisman <[email protected]>
1 parent a1cf1b8 commit 43891ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: console-subscriber/src/callsites.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ impl<const MAX_CALLSITES: usize> Callsites<MAX_CALLSITES> {
2323
}
2424

2525
let idx = self.len.fetch_add(1, Ordering::AcqRel);
26-
if idx <= MAX_CALLSITES {
26+
if idx < MAX_CALLSITES {
2727
// If there's still room in the callsites array, stick the address
2828
// in there.
2929
self.ptrs[idx]

0 commit comments

Comments
 (0)