Fix heap use after free in compiler.c

This commit is contained in:
solar-mist
2022-08-22 18:48:08 +00:00
parent 5b82ed8e45
commit 2f538e79fe

View File

@@ -754,7 +754,7 @@ unsigned char* collateCompiler(Compiler* compiler, int* size) {
emitByte(&collation, &capacity, &count, OP_EOF); //terminate bytecode
//finalize
SHRINK_ARRAY(unsigned char, collation, capacity, count);
collation = SHRINK_ARRAY(unsigned char, collation, capacity, count);
*size = count;