master
Ondřej Hruška 3 years ago
parent 569536ae86
commit 651fe65ae2
Signed by: MightyPork
GPG Key ID: 2C5FD5035250423D
  1. 4
      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));

Loading…
Cancel
Save