all repos — hex @ 309a6f89a0305768c8bd2f57d18f33fc2fbbd39a

A tiny, minimalist, slightly-esoteric concatenative programming lannguage.

Fixed map symbol
Fabio Cevasco h3rald@h3rald.com
Fri, 03 Jan 2025 17:18:42 +0100
commit

309a6f89a0305768c8bd2f57d18f33fc2fbbd39a

parent

140ed1b832a4bd20b57b8f2967979ddce9010f35

1 files changed, 5 insertions(+), 2 deletions(-)

jump to
M src/symbols.csrc/symbols.c

@@ -2575,11 +2575,13 @@ HEX_FREE(ctx, list);

hex_free_list(ctx, quotation, i); return 1; } - for (size_t j = 0; j < action->quotation_size; j++) + hex_item_t *act = hex_copy_item(ctx, action); + for (size_t j = 0; j < act->quotation_size; j++) { - if (hex_push(ctx, action->data.quotation_value[j]) != 0) + if (hex_push(ctx, act->data.quotation_value[j]) != 0) { HEX_FREE(ctx, action); + HEX_FREE(ctx, act); HEX_FREE(ctx, list); hex_free_list(ctx, quotation, i); return 1;

@@ -2591,6 +2593,7 @@ {

hex_error(ctx, "[symbol map] Memory allocation failed"); HEX_FREE(ctx, action); HEX_FREE(ctx, list); + HEX_FREE(ctx, act); hex_free_list(ctx, quotation, i); return 1; }