Fix overflow error for value_nextbuf

This commit is contained in:
Rodrigo Arias 2023-03-23 17:51:30 +01:00 committed by Rodrigo Arias Mallo
parent d8a9f33075
commit d86d5fec5f

View File

@ -81,7 +81,7 @@ value_str(struct value a)
die("value string too long"); die("value string too long");
value_nextbuf++; value_nextbuf++;
if (value_nextbuf > VALUE_NBUF) if (value_nextbuf >= VALUE_NBUF)
value_nextbuf = 0; value_nextbuf = 0;
return buf; return buf;