*fixed a wrong loop bug with WHILE and DO statements.

This commit is contained in:
Wang Renxin 2016-02-10 21:27:38 +08:00
parent 2df0952b19
commit 7af445ec1b

View File

@ -12549,12 +12549,12 @@ _loop_begin:
result = MB_FUNC_OK; result = MB_FUNC_OK;
goto _exit; goto _exit;
} else if(result == MB_SUB_RETURN) { /* RETURN */ } else if(result == MB_SUB_RETURN && s->last_routine) { /* RETURN */
if(ast) ast = ast->prev; if(ast) ast = ast->prev;
if(ast) ast = ast->prev; if(ast) ast = ast->prev;
goto _exit; goto _exit;
} else if(result != MB_FUNC_OK) { /* Normally */ } else if(result != MB_FUNC_OK && result != MB_SUB_RETURN) { /* Normally */
goto _exit; goto _exit;
} }
@ -12628,12 +12628,12 @@ _loop_begin:
result = MB_FUNC_OK; result = MB_FUNC_OK;
goto _exit; goto _exit;
} else if(result == MB_SUB_RETURN) { /* RETURN */ } else if(result == MB_SUB_RETURN && s->last_routine) { /* RETURN */
if(ast) ast = ast->prev; if(ast) ast = ast->prev;
if(ast) ast = ast->prev; if(ast) ast = ast->prev;
goto _exit; goto _exit;
} else if(result != MB_FUNC_OK) { /* Normally */ } else if(result != MB_FUNC_OK && result != MB_SUB_RETURN) { /* Normally */
goto _exit; goto _exit;
} }