From f6b027c591ffce971680a024e6d5a4bb11674c8f Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Sat, 14 Oct 2017 03:19:20 -0500 Subject: [PATCH] Fix heap delete to mark current as not in use, instead of prev --- src/nostalgia/core/gba/mem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) {