diff options
Diffstat (limited to 'com.c')
-rw-r--r-- | com.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -18,7 +18,7 @@ static void compile_node(Chunk *ch, AstNode a) { break; case AST_STRING: { size_t len = strlen(a.as.str); - ObjString *o = objstring_new(a.as.str, len); + ObjString *o = objstring_copy(a.as.str, len); chunk_wbc(ch, OP_LOADK); chunk_wbc(ch, chunk_wconst(ch, VAL_OBJ(o))); break; |