*fixed a routine evaluation bug when it's stored in a variable.

This commit is contained in:
paladin-t 2016-01-12 13:08:37 +08:00
parent 00b8a5111f
commit f4ce66dedf
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,6 @@
Jan. 12 2016
Fixed a routine evaluation bug when it's stored in a variable
Jan. 11 2016 Jan. 11 2016
Fixed a crash bug when a DO-UNTIL statement is the end of a program Fixed a crash bug when a DO-UNTIL statement is the end of a program
Fixed a memory leak with string manipulation Fixed a memory leak with string manipulation

View File

@ -2969,8 +2969,13 @@ _routine:
); );
if(cs) { if(cs) {
c = (_object_t*)cs->data; c = (_object_t*)cs->data;
if(c && c->type == _DT_ROUTINE) if(c && c->type == _DT_ROUTINE) {
goto _routine; goto _routine;
} else if(c && c->type == _DT_VAR && c->data.variable->data->type == _DT_ROUTINE) {
c = c->data.variable->data;
goto _routine;
}
} }
if(ast) { if(ast) {
_object_t* _err_or_bracket = (_object_t*)ast->data; _object_t* _err_or_bracket = (_object_t*)ast->data;