From f4ce66dedfed7841e11e1ccb2e4f1279694020cd Mon Sep 17 00:00:00 2001 From: paladin-t Date: Tue, 12 Jan 2016 13:08:37 +0800 Subject: [PATCH] *fixed a routine evaluation bug when it's stored in a variable. --- HISTORY | 3 +++ core/my_basic.c | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/HISTORY b/HISTORY index a118bfb..67d2b1e 100755 --- a/HISTORY +++ b/HISTORY @@ -1,3 +1,6 @@ +Jan. 12 2016 +Fixed a routine evaluation bug when it's stored in a variable + Jan. 11 2016 Fixed a crash bug when a DO-UNTIL statement is the end of a program Fixed a memory leak with string manipulation diff --git a/core/my_basic.c b/core/my_basic.c index 188e3eb..30ad221 100755 --- a/core/my_basic.c +++ b/core/my_basic.c @@ -2969,8 +2969,13 @@ _routine: ); if(cs) { c = (_object_t*)cs->data; - if(c && c->type == _DT_ROUTINE) + if(c && c->type == _DT_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) { _object_t* _err_or_bracket = (_object_t*)ast->data;