From 651fe65ae2381481f3b01e308125d2d4f8ce94de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Hru=C5=A1ka?= Date: Wed, 17 Nov 2021 01:10:26 +0100 Subject: [PATCH] fixes --- src/fh_runtime.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/fh_runtime.c b/src/fh_runtime.c index a1778b0..164f890 100644 --- a/src/fh_runtime.c +++ b/src/fh_runtime.c @@ -356,10 +356,8 @@ enum fh_error w_user_word(struct fh_thread_s *fh, const struct fh_word_s *w0) case FH_INSTR_TYPESTR: strl = instr->data; if (instr->kind == FH_INSTR_ALLOCSTR) { - TRY(fh_heap_reserve(fh, strl, &addr)); LOG("Exec: alloc-str \"%.*s\"", strl, fh_str_at(fh, fh->execptr)); - fh_heap_copy(fh, addr, fh->execptr, strl); - TRY(ds_push(fh, addr)); + TRY(ds_push(fh, fh->execptr)); // give pointer directly into the definition TRY(ds_push(fh, strl)); } else { LOG("Exec: type-str \"%.*s\"", strl, fh_str_at(fh, fh->execptr));