From 74e2907f09c8a2b8536dde9837065d8d2c78a83c Mon Sep 17 00:00:00 2001 From: Kayne Ruse Date: Sat, 13 Aug 2022 16:31:11 +0100 Subject: [PATCH] Fixed array/dictionary confusion --- source/compiler.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/compiler.c b/source/compiler.c index 0e1c418..905407a 100644 --- a/source/compiler.c +++ b/source/compiler.c @@ -88,7 +88,7 @@ static int writeNodeCompoundToCache(Compiler* compiler, Node* node) { } //push the store to the cache, with instructions about how pack it - index = pushLiteralArray(&compiler->literalCache, TO_ARRAY_LITERAL(store)); //WARNING: pushed as a dictionary, so below can recognize it + index = pushLiteralArray(&compiler->literalCache, TO_DICTIONARY_LITERAL(store)); //WARNING: pushed as a dictionary, so below can recognize it } else if (node->compound.literalType == LITERAL_ARRAY) { //ensure each literal value is in the cache, individually @@ -439,6 +439,7 @@ unsigned char* collateCompiler(Compiler* compiler, int* size) { } freeLiteralArray(ptr); + FREE(LiteralArray, ptr); } break;