Skip to content

Commit 43891ab

Browse files
fix(subscriber): fix off-by-one indexing for callsites (#391)
Co-authored-by: Eliza Weisman <eliza@buoyant.io>
1 parent a1cf1b8 commit 43891ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

console-subscriber/src/callsites.rs

Lines changed: 1 addition & 1 deletion
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)