mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Don't read from a per-map COLORMAP if it is too big.
Could this be changed to only read the first so many bytes?
This commit is contained in:
parent
4ed81519e8
commit
d491c62c7c
1 changed files with 9 additions and 0 deletions
|
|
@ -1073,6 +1073,15 @@ void R_ReInitColormaps(UINT16 num)
|
|||
lump = W_GetNumForName(colormap);
|
||||
if (lump == LUMPERROR)
|
||||
lump = W_GetNumForName("COLORMAP");
|
||||
else
|
||||
{
|
||||
if (W_LumpLength(lump) > W_LumpLength(W_GetNumForName("COLORMAP")))
|
||||
{
|
||||
CONS_Alert(CONS_WARNING, "%s lump size is too big, using COLORMAP.\n", colormap);
|
||||
lump = W_GetNumForName("COLORMAP");
|
||||
}
|
||||
}
|
||||
|
||||
W_ReadLump(lump, colormaps);
|
||||
|
||||
// Init Boom colormaps.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue