cgen: fix a bug with tmp strings/free

pull/5024/head
Alexander Medvednikov 2020-05-25 11:01:21 +00:00
parent 53a10eb312
commit bc3e29e77b
1 changed files with 3 additions and 1 deletions

View File

@ -100,7 +100,9 @@ string _STR_TMP(const char *fmt, ...) {
//puts('_STR_TMP:');
//puts(g_str_buf);
#endif
return tos(g_str_buf, len);
string res = tos(g_str_buf, len);
res.is_lit = true;
return res;
} // endof _STR_TMP
")