From d86d5fec5f4d08f6a654ab66e13bc3b9fa2a7603 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Date: Thu, 23 Mar 2023 17:51:30 +0100 Subject: [PATCH] Fix overflow error for value_nextbuf --- src/emu/value.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/emu/value.h b/src/emu/value.h index 42f6e1d..82d78f9 100644 --- a/src/emu/value.h +++ b/src/emu/value.h @@ -81,7 +81,7 @@ value_str(struct value a) die("value string too long"); value_nextbuf++; - if (value_nextbuf > VALUE_NBUF) + if (value_nextbuf >= VALUE_NBUF) value_nextbuf = 0; return buf;