From fa59b89a30f5ec834f6974edb236c7aba05ee229 Mon Sep 17 00:00:00 2001 From: TazyFoundSoup Date: Sun, 22 Feb 2026 20:52:05 +1100 Subject: feat(bench): Check if marker size is out of bounds --- bench/bench.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'bench/bench.h') diff --git a/bench/bench.h b/bench/bench.h index ac414ce..b999490 100644 --- a/bench/bench.h +++ b/bench/bench.h @@ -2,6 +2,7 @@ #define TINYFF_BENCH_H_ #include +#include #define FF_BENCH_MAX_MARKERS 32 @@ -37,8 +38,8 @@ static inline void ff_bench_end(ff_bench *b) { b->_end = clock(); } -static inline void ff_bench_mark(ff_bench *b, const char *label) { - if (b->_mcount >= FF_BENCH_MAX_MARKERS) return; +static inline ff_result ff_bench_mark(ff_bench *b, const char *label) { + if (b->_mcount >= FF_BENCH_MAX_MARKERS) return FF_RESULT_ERROR_OUT_OF_BOUNDS; ff_bench_marker m; m.label = label; -- cgit v1.2.3