1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

cgen: fix a bug with tmp strings/free

This commit is contained in:
Alexander Medvednikov 2020-05-25 11:01:21 +00:00
parent 53a10eb312
commit bc3e29e77b

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
")