finally fixed this memory bug

we were accidentally tracking frees of stuff that was never
allocated lol
This commit is contained in:
2023-08-25 21:22:10 -05:00
committed by cpunch
parent 2f0f675159
commit 1a78a9ab5f
2 changed files with 1 additions and 1 deletions

View File

@@ -10,6 +10,7 @@
// realloc wrapper
void *cosmoM_reallocate(CState *state, void *buf, size_t oldSize, size_t newSize)
{
if (buf == NULL) oldSize = 0;
#ifdef GC_DEBUG
printf("old allocated bytes: %ld\n", state->allocatedBytes);
if (buf) {