*fixed a crash bug in invalid conditional expression with class member, thanks to AaBc for pointing it out.

This commit is contained in:
Wang Renxin 2018-05-09 13:20:54 +08:00
parent fd9e34b9d1
commit e164d3c428
2 changed files with 9 additions and 0 deletions

View File

@ -1,3 +1,6 @@
May. 9 2018
Fixed a crash bug in invalid conditional expression with class member, thanks to AaBc for pointing it out
Apr. 20 2018 Apr. 20 2018
Avoided a warning when a C++ compiler refers char to unsigned Avoided a warning when a C++ compiler refers char to unsigned

View File

@ -8404,6 +8404,12 @@ static int _clone_clsss_field(void* data, void* extra, void* n) {
ret = _duplicate_parameter(var, 0, instance->scope); ret = _duplicate_parameter(var, 0, instance->scope);
_clone_object(instance->ref.s, obj, ret->data.variable->data, false, var->data->type != _DT_CLASS); _clone_object(instance->ref.s, obj, ret->data.variable->data, false, var->data->type != _DT_CLASS);
#ifdef MB_ENABLE_SOURCE_TRACE
ret->source_pos = -1;
ret->source_row = ret->source_col = 0xFFFF;
#else /* MB_ENABLE_SOURCE_TRACE */
ret->source_pos = -1;
#endif /* MB_ENABLE_SOURCE_TRACE */
} }
break; break;