Skip to content

Commit f453c23

Browse files
committed
match Memory_Z.cpp
1 parent a639057 commit f453c23

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Engine/Memory_Z.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ typedef void* (*Memory_Manager__AllocContiguous)(MemoryManager_Z*,U32,const Char
266266
// so I tried working around it but it only gets to 50%
267267
void* Z_AllocContiguous(U32 i_Size, const Char* i_Comment, const Char* i_File, S32 i_Line, U32 i_Align) {
268268
MemoryManager_Z* l_MemMgr = &MemManager;
269-
void* result = (*(Memory_Manager__AllocContiguous*)((*(U32**)(*(U32*)&l_MemMgr+0x20))[4]))(l_MemMgr, i_Size, i_Comment, i_File, i_Line, i_Align);
269+
void* result = l_MemMgr->Alloc(i_Size, i_Comment, i_File, i_Line, i_Align);
270270
return result;
271271
}
272272

@@ -280,7 +280,8 @@ void Z_Free(void* i_Ptr) {
280280

281281
// $SABE: This has the same issue as Z_AllocContiguous
282282
void Z_FreeContiguous(void* i_Ptr) {
283-
283+
MemoryManager_Z* l_MemMgr = &MemManager;
284+
l_MemMgr->Free(i_Ptr);
284285
}
285286

286287
void Hi_MemoryManager_Z::SetCallStackPtrs(U32* a1, S32 a2) {

0 commit comments

Comments
 (0)