Skip to content

Commit 96406c2

Browse files
author
Niko
committed
clearity
1 parent 3f65295 commit 96406c2

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

decompile/General/MEMPACK/MEMPACK_00_Init.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ void DECOMP_MEMPACK_Init(int ramSize)
1616
{
1717

1818
unsigned int startPtr;
19+
int packSize;
1920

2021
#ifdef REBUILD_PC
2122

@@ -32,8 +33,8 @@ void DECOMP_MEMPACK_Init(int ramSize)
3233
startPtr
3334
);
3435

35-
ramSize = 32*1024*1024;
36-
memset(startPtr, 0, ramSize);
36+
packSize = 32*1024*1024;
37+
memset(startPtr, 0, packSize);
3738

3839
#else
3940

@@ -53,8 +54,8 @@ void DECOMP_MEMPACK_Init(int ramSize)
5354
// Original game allocated 0x800 to stack,
5455
// but now Stack is relocated to kernel memory
5556
startPtr = ((u_int)OVR_Region3 + Aligned231);
56-
ramSize -= (int)(startPtr & 0xffffff);
57+
packSize = ramSize - (int)(startPtr & 0xffffff);
5758
#endif
5859

59-
DECOMP_MEMPACK_NewPack(startPtr, ramSize);
60+
DECOMP_MEMPACK_NewPack(startPtr, packSize);
6061
}

0 commit comments

Comments
 (0)