Skip to content

Commit

Permalink
fix(subscriber): fix off-by-one indexing for callsites (#391)
Browse files Browse the repository at this point in the history
Co-authored-by: Eliza Weisman <eliza@buoyant.io>
  • Loading branch information
danielhenrymantilla and hawkw committed Sep 29, 2023
1 parent a1cf1b8 commit 43891ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion console-subscriber/src/callsites.rs
Expand Up @@ -23,7 +23,7 @@ impl<const MAX_CALLSITES: usize> Callsites<MAX_CALLSITES> {
}

let idx = self.len.fetch_add(1, Ordering::AcqRel);
if idx <= MAX_CALLSITES {
if idx < MAX_CALLSITES {
// If there's still room in the callsites array, stick the address
// in there.
self.ptrs[idx]
Expand Down

0 comments on commit 43891ab

Please sign in to comment.