diff --git a/HISTORY b/HISTORY index dd05d92..fd8b83f 100755 --- a/HISTORY +++ b/HISTORY @@ -1,3 +1,6 @@ +Apr. 5 2016 +Added a warning when a "tostring" meta method didn't return a string + Mar. 29 2016 Added a help option to the shell diff --git a/core/my_basic.c b/core/my_basic.c index 8eeaf6b..8d8d81b 100755 --- a/core/my_basic.c +++ b/core/my_basic.c @@ -15276,6 +15276,8 @@ _print: val_ptr->data.string = mb_strdup(val_ptr->data.string, strlen(val_ptr->data.string) + 1); val_ptr->ref = false; mb_make_nil(s->running_context->intermediate_value); + } else { + _handle_error_on_obj(s, SE_RN_STRING_EXPECTED, s->source_file, DON(ast), MB_FUNC_WARNING, _exit, result); } obj = val_ptr; got_tostr = true; diff --git a/output/my_basic.exe b/output/my_basic.exe index 668e158..e3023d9 100755 Binary files a/output/my_basic.exe and b/output/my_basic.exe differ