assert its smaller than 5
This commit is contained in:
1 parent
c50f109f05
commit
3502da17df
1 file changed
+1
@@ -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++)
|
||||||
|
|||||||
Reference in new issue
Block a user