Skip to content
Snippets Groups Projects
Commit 45922f80 authored by Sryder's avatar Sryder
Browse files

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?
parent 1af969d5
No related branches found
No related tags found
1 merge request!501More Memory Shenanigans
......@@ -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.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment