*fixed a crash bug when there's no receiver of a returned string value.

This commit is contained in:
Wang Renxin 2017-05-10 21:04:34 +08:00
parent f83627bd20
commit 305f698b9a
2 changed files with 4 additions and 1 deletions

View File

@ -1,5 +1,6 @@
May. 10 2017
Added an mb_make_usertype_bytes macro
Fixed a crash bug when there's no receiver of a returned string value, thanks to Beyond07 for pointing it out
May. 8 2017
Added fork functions

View File

@ -9946,7 +9946,7 @@ static void _mark_edge_destroy_string(mb_interpreter_t* s, char* ch) {
static void _destroy_lazy_objects(mb_interpreter_t* s) {
mb_assert(s);
_ls_foreach(s->lazy_destroy_objects, _destroy_object);
_LS_FOREACH(s->lazy_destroy_objects, _destroy_object, _try_clear_intermediate_value, s);
_ls_clear(s->lazy_destroy_objects);
}
@ -11883,6 +11883,8 @@ int mb_pop_value(struct mb_interpreter_t* s, void** l, mb_value_t* val) {
}
#endif /* MB_ENABLE_USERTYPE_REF */
ast = (_ls_node_t*)*l;
if(!ast)
goto _exit;
#ifdef _MULTILINE_STATEMENT
if(_multiline_statement(s)) {
_object_t* obj = 0;