From 7d35fe3243ca8cbdb568d12490c22cea89bd28f4 Mon Sep 17 00:00:00 2001 From: paladin-t Date: Tue, 19 Apr 2016 10:39:33 +0800 Subject: [PATCH] *polished assign operator detection code. --- core/my_basic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/my_basic.c b/core/my_basic.c index b8591ff..02d7b2a 100755 --- a/core/my_basic.c +++ b/core/my_basic.c @@ -12872,7 +12872,7 @@ static int _core_let(mb_interpreter_t* s, void** l) { } #endif /* MB_ENABLE_COLLECTION_LIB */ obj = (_object_t*)ast->data; - if(obj->type != _DT_FUNC || strcmp(obj->data.func->name, "=") != 0) { + if(!_IS_FUNC(obj, _core_equal)) { /* Is it an assign operator? */ _handle_error_on_obj(s, SE_RN_ASSIGN_OPERATOR_EXPECTED, s->source_file, DON(ast), MB_FUNC_ERR, _exit, result); }