assert its smaller than 5

This commit is contained in:
iceman1001 2024-05-12 19:36:28 +02:00
commit 3502da17df

View file

@ -186,6 +186,7 @@ static int stream_get(stream_t *stream, json_error_t *error) {
// whatif count == 1 ?!? // whatif count == 1 ?!?
assert(count >= 2); assert(count >= 2);
assert(count <= 4);
// if count == 4 , i will become 5 and overflow. // if count == 4 , i will become 5 and overflow.
for (i = 1; i < count; i++) for (i = 1; i < count; i++)