Fixed a too-small memory allocation for Encore remaps, removing all memory-related crashes in Software.

This commit is contained in:
toaster 2021-02-15 16:37:37 +00:00
parent 8a4542a5ef
commit a597d9b463

View file

@ -731,7 +731,7 @@ lighttable_t *R_CreateLightTable(extracolormap_t *extra_colormap)
// Now allocate memory for the actual colormap array itself!
// aligned on 8 bit for asm code
colormap_p = Z_MallocAlign((256 * 34) + 10, PU_LEVEL, NULL, 8);
colormap_p = Z_MallocAlign((256 * (encoremap ? 64 : 32)) + 10, PU_LEVEL, NULL, 8);
lighttable = (UINT8 *)colormap_p;
// Calculate the palette index for each palette index, for each light level