From 9a4363a547b2391d8ae635deb2b7d9fa7e8514f0 Mon Sep 17 00:00:00 2001 From: paladin-t Date: Tue, 19 Apr 2016 11:31:39 +0800 Subject: [PATCH] *fixed an error raising issue with incomplete if structure. --- HISTORY | 3 +++ core/my_basic.c | 9 +++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/HISTORY b/HISTORY index 421eb41..25d4da5 100755 --- a/HISTORY +++ b/HISTORY @@ -1,3 +1,6 @@ +Apr. 19 2016 +Fixed an error raising issue with incomplete IF structure + Apr. 18 2016 Fixed an invalid iterator issue with ranged list diff --git a/core/my_basic.c b/core/my_basic.c index 02d7b2a..8cd05d9 100755 --- a/core/my_basic.c +++ b/core/my_basic.c @@ -9501,8 +9501,9 @@ static int _common_end_looping(mb_interpreter_t* s, _ls_node_t** l) { mb_assert(s && l); - if(_skip_struct(s, l, _core_for, _core_next) == MB_FUNC_OK) - _skip_to(s, l, 0, _DT_EOS); + result = _skip_struct(s, l, _core_for, _core_next); + if(result == MB_FUNC_OK) + result = _skip_to(s, l, 0, _DT_EOS); return result; } @@ -9625,7 +9626,7 @@ _to: if((_compare_numbers(step_val_ptr, &_OBJ_INT_ZERO) == 1 && _compare_numbers(var_loop->data, to_val_ptr) == 1) || (_compare_numbers(step_val_ptr, &_OBJ_INT_ZERO) == -1 && _compare_numbers(var_loop->data, to_val_ptr) == -1)) { /* End looping */ - _common_end_looping(s, &ast); + result = _common_end_looping(s, &ast); goto _exit; } else { @@ -9713,7 +9714,7 @@ _to: } if(!lit && !dit) { /* End looping */ - _common_end_looping(s, &ast); + result = _common_end_looping(s, &ast); goto _exit; } else {