all repos — hex @ 167979b268129ccb6adf8f3f513b4a59bcdb0bc4

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

Fixes
Fabio Cevasco h3rald@h3rald.com
Wed, 01 Jan 2025 12:12:13 +0100
commit

167979b268129ccb6adf8f3f513b4a59bcdb0bc4

parent

f6e3be8207b9c9af96a1038360b7c5853f9b5eba

1 files changed, 1 insertions(+), 17 deletions(-)

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

@@ -1238,13 +1238,6 @@ {

HEX_FREE(ctx, b); return 1; } - HEX_ALLOC(a); - if (!a) - { - hex_error(ctx, "[symbol xor] Memory allocation failed"); - HEX_FREE(ctx, b); - return 1; - } HEX_POP(ctx, a); ; if (a->type == HEX_TYPE_INVALID)

@@ -2047,7 +2040,7 @@ }

int hex_symbol_run(hex_context_t *ctx) { - HEX_POP(command); + HEX_POP(ctx, command); if (command->type == HEX_TYPE_INVALID) { HEX_FREE(ctx, command);

@@ -2253,15 +2246,6 @@ HEX_FREE(ctx, thenBlock);

HEX_FREE(ctx, elseBlock); return 1; } - } - HEX_ALLOC(evalResult); - if (!evalResult) - { - hex_error(ctx, "[symbol if] Memory allocation failed"); - HEX_FREE(ctx, condition); - HEX_FREE(ctx, thenBlock); - HEX_FREE(ctx, elseBlock); - return 1; } HEX_POP(ctx, evalResult); ;