From ed4348ad48818382ede7840045a71133945de882 Mon Sep 17 00:00:00 2001 From: Wang Renxin Date: Wed, 8 Mar 2017 11:30:36 +0800 Subject: [PATCH] *fixed a processing bug when printing with a native routine of a class instance. --- HISTORY | 5 ++++- core/my_basic.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/HISTORY b/HISTORY index da8b6b4..110701e 100755 --- a/HISTORY +++ b/HISTORY @@ -1,3 +1,6 @@ +Mar. 8 2017 +Fixed a processing bug when printing with a native routine of a class instance + Feb. 28 2017 Fixed an issue with reference count manipulation of a value @@ -13,7 +16,7 @@ Feb. 16 2017 Improved meta function Feb. 14 2017 -Fixed a wrong routing unreferencing bug +Fixed a wrong routine unreferencing bug Feb. 10 2017 Fixed a parameter lookup bug when calling a sub routine diff --git a/core/my_basic.c b/core/my_basic.c index db63c4c..8deadb9 100755 --- a/core/my_basic.c +++ b/core/my_basic.c @@ -10026,7 +10026,10 @@ static _object_t* _eval_var_in_print(mb_interpreter_t* s, _object_t** val_ptr, _ mb_make_nil(s->running_context->intermediate_value); } **val_ptr = tmp; - if(*ast) *ast = (*ast)->prev; + if(obj->data.routine->type != _IT_NATIVE) { + if(*ast) + *ast = (*ast)->prev; + } break; case _DT_VAR: