diff --git a/HISTORY b/HISTORY index e8569f9..703f761 100755 --- a/HISTORY +++ b/HISTORY @@ -1,3 +1,6 @@ +Nov. 5 2018 +Fixed a crash bug when using an iterator in a conditional expression + Jul. 30 2018 Fixed a crash bug with incomplete structures diff --git a/core/my_basic.c b/core/my_basic.c index 8765d9f..f85ea54 100755 --- a/core/my_basic.c +++ b/core/my_basic.c @@ -15827,9 +15827,22 @@ _exit: *l = ast; - if(val->type != _DT_UNKNOWN) + switch(val->type) { +#ifdef MB_ENABLE_COLLECTION_LIB + case _DT_LIST_IT: /* Fall through */ + case _DT_DICT_IT: + _destroy_object_capsule_only(val, 0); + + break; +#endif /* MB_ENABLE_COLLECTION_LIB */ + case _DT_UNKNOWN: /* Do nothing */ + break; + default: _destroy_object(val, 0); + break; + } + return result; }