mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-11 21:21:57 -04:00
Fix heap corruption caused by JKRExpHeap::do_freeAll
Caused by a size that should've been sizeof(CMemBlock). Simple way to repro was to open and close the full map on dpad, afterwards heap check would fail.
This commit is contained in:
@@ -472,7 +472,7 @@ void JKRExpHeap::do_freeAll() {
|
||||
JKRHeap::callAllDisposer();
|
||||
mHeadFreeList = (CMemBlock*)mStart;
|
||||
mTailFreeList = mHeadFreeList;
|
||||
mHeadFreeList->initiate(NULL, NULL, mSize - 0x10, 0, 0);
|
||||
mHeadFreeList->initiate(NULL, NULL, mSize - sizeof(CMemBlock), 0, 0);
|
||||
mHeadUsedList = NULL;
|
||||
mTailUsedList = NULL;
|
||||
#if DEBUG
|
||||
|
||||
Reference in New Issue
Block a user