fix a bunch of memory bugs
This commit is contained in:
@@ -238,7 +238,7 @@ GroundBytecode _GroundNewBytecode(GroundProgram* program, GroundState* state) {
|
||||
if (Ground.Flags.error) return bytecode;
|
||||
|
||||
// Allocate heap
|
||||
bytecode.heap.heap = malloc(sizeof(GroundValue) * size);
|
||||
bytecode.heap.heap = malloc(sizeof(GroundBytecodeValue) * size);
|
||||
if (bytecode.heap.heap == NULL) {
|
||||
Ground.Log.Error("malloc failed in Ground.New.Bytecode");
|
||||
Ground.Flags.error = true;
|
||||
|
||||
Reference in New Issue
Block a user