From 233c1d5b9e07171d21284b695c3930e45071c02c Mon Sep 17 00:00:00 2001 From: tonton th Date: Sun, 7 Jun 2020 09:30:09 +0200 Subject: [PATCH] off-by-one error killed ! --- bubulles.c | 2 +- bubulles.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bubulles.c b/bubulles.c index de708bf..0a6885d 100644 --- a/bubulles.c +++ b/bubulles.c @@ -139,7 +139,7 @@ fprintf(stderr, "%s : %p --> %p\n", __func__, what, where); fprintf(stderr, "XYZ %f %f %f\n", what->p.x, what->p.y, what->p.z); #endif -if (where->fidx > where->size) { +if (where->fidx >= where->size) { /* this is a very bad fatal error */ fprintf(stderr, "%s : overflow in BBList at %p\n", __func__, where); #if MUST_ABORT diff --git a/bubulles.h b/bubulles.h index feff58f..d647561 100644 --- a/bubulles.h +++ b/bubulles.h @@ -4,7 +4,7 @@ /* --------------------------------------------------------------------- */ -#define LIBBB_VERSION 53 +#define LIBBB_VERSION 54 #define SZ_BUBULLE_TEXT 51 /* arbitrary value */