Make sure that loop depth is greater than 0 before decrementing it.
@@ -1016,10 +1016,13 @@ expression
$$.type = EXPRESSION_TYPE_BOOLEAN;
}
| _FOR_ for_expression error
+ {
+ if (compiler->loop_depth > 0)
{
compiler->loop_depth--;
compiler->loop_identifier[compiler->loop_depth] = NULL;
}
+ }
| _FOR_ for_expression _IDENTIFIER_ _IN_
{
int var_index;
