From b8f44cc219ce18d07c2e2461b426ba5a79a72a50 Mon Sep 17 00:00:00 2001 From: Patrick Pelissier Date: Tue, 16 Jul 2019 22:57:12 +0200 Subject: [PATCH] Fix bug (number of reader was too big, resulting in potential segfault) --- m-snapshot.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/m-snapshot.h b/m-snapshot.h index 6d6ca48b..cfc1bafc 100644 --- a/m-snapshot.h +++ b/m-snapshot.h @@ -351,7 +351,7 @@ static inline unsigned int snapshot_mrsw_int_get_write_idx(snapshot_mrsw_int_t s static inline unsigned int snapshot_mrsw_int_size(snapshot_mrsw_int_t s) { SNAPSHOTI_SPMC_INT_CONTRACT(s); - return s->n - SNAPSHOTI_SPMC_EXTRA_BUFFER; + return s->n; } static inline unsigned int snapshot_mrsw_int_write_idx(snapshot_mrsw_int_t s, unsigned int idx)