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:
toaster 2023-02-06 20:46:47 +00:00
parent f0ea20d54d
commit 8b7faa10c1

View file

@ -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;
}