fix possible leak if wrong input

This commit is contained in:
2021-12-11 10:04:22 +01:00
parent 171eadf318
commit b998ada9d2

View File

@@ -68,7 +68,7 @@ static s64 match_incomplete()
s64 res = 0;
while ((co = pop())) {
for (size_t i = 0; i < sizeof(syntax); ++i) {
for (size_t i = 0; i < sizeof(syntax) / sizeof(struct match); ++i) {
if (co == syntax[i].open) {
res = res * 5 + syntax[i].value_incomplete;
break;