*fixed a sub routine invoking bug without leading CALL statement or result receiver.

This commit is contained in:
Wang Renxin 2015-09-08 13:37:44 +08:00
parent 05e883c65e
commit 583cc5ae53

View File

@ -3599,6 +3599,11 @@ int _execute_statement(mb_interpreter_t* s, _ls_node_t** l) {
case _DT_STRING:
_handle_error_on_obj(s, SE_RN_INVALID_EXPRESSION, 0, DON(ast), MB_FUNC_ERR, _exit, result);
break;
case _DT_ROUTINE:
ast = ast->prev;
result = _core_call(s, (void**)(&ast));
break;
default:
break;
@ -6134,7 +6139,8 @@ int _core_call(mb_interpreter_t* s, void** l) {
_eval_routine(s, &ast, routine);
ast = ast->prev;
if(ast)
ast = ast->prev;
*l = ast;