mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-22 02:00:11 +00:00
M_LevelListFromGametype: Remove memory-corrupting memset
- firstlen was in units of raw UINT8 address (pre-multiplied by sizeof(cupheader_t*)) to permit being used in Z_Realloc. However, it was being added onto the cupgrid.builtgrid pointer BEFORE it was cast into UINT8* for memset, leading to an offset, when considered in terms of UINT8 address. - Z_Realloc2 is always guaranteed to memset any appended memory so this wasn't even required
This commit is contained in:
parent
f0ea20d54d
commit
8b7faa10c1
1 changed files with 0 additions and 1 deletions
|
|
@ -288,7 +288,6 @@ boolean M_LevelListFromGametype(INT16 gt)
|
|||
I_Error("M_LevelListFromGametype: Not enough memory to reallocate builtgrid");
|
||||
}
|
||||
|
||||
memset(cupgrid.builtgrid + firstlen, 0, firstlen);
|
||||
cupgrid.cappages *= 2;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue