diff --git a/src/nostalgia/core/gba/mem.cpp b/src/nostalgia/core/gba/mem.cpp index f0a9fee8..8a7fd40f 100644 --- a/src/nostalgia/core/gba/mem.cpp +++ b/src/nostalgia/core/gba/mem.cpp @@ -75,7 +75,7 @@ void operator delete(void *ptr) { // ptr was found as a valid memory allocation, deallocate it if (current) { // mark as not in use - prev->inUse = false; + current->inUse = false; // join with next if next is also unused if (current->next && !current->next->inUse) {