*fixed a crash bug with the do-until statement.
This commit is contained in:
parent
6ff2f37a6d
commit
69036f748e
@ -15918,7 +15918,7 @@ _loop_begin:
|
|||||||
ast = loop_begin_node;
|
ast = loop_begin_node;
|
||||||
|
|
||||||
obj = (_object_t*)ast->data;
|
obj = (_object_t*)ast->data;
|
||||||
while(!_IS_FUNC(obj, _core_until)) {
|
while(obj && !_IS_FUNC(obj, _core_until)) {
|
||||||
result = _execute_statement(s, &ast, true);
|
result = _execute_statement(s, &ast, true);
|
||||||
if(result == MB_LOOP_BREAK) { /* EXIT */
|
if(result == MB_LOOP_BREAK) { /* EXIT */
|
||||||
if(_skip_struct(s, &ast, _core_do, 0, _core_until) != MB_FUNC_OK)
|
if(_skip_struct(s, &ast, _core_do, 0, _core_until) != MB_FUNC_OK)
|
||||||
@ -15936,11 +15936,11 @@ _loop_begin:
|
|||||||
goto _exit;
|
goto _exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
obj = (_object_t*)ast->data;
|
obj = ast ? (_object_t*)ast->data : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
obj = (_object_t*)ast->data;
|
obj = ast ? (_object_t*)ast->data : 0;
|
||||||
if(!_IS_FUNC(obj, _core_until)) {
|
if(!obj || !_IS_FUNC(obj, _core_until)) {
|
||||||
_handle_error_on_obj(s, SE_RN_UNTIL_EXPECTED, s->source_file, DON(ast), MB_FUNC_ERR, _exit, result);
|
_handle_error_on_obj(s, SE_RN_UNTIL_EXPECTED, s->source_file, DON(ast), MB_FUNC_ERR, _exit, result);
|
||||||
}
|
}
|
||||||
ast = ast->next;
|
ast = ast->next;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user