engine.c: in loadlookups(), error out if attempting to load at a reserved pal.

git-svn-id: https://svn.eduke32.com/eduke32@4345 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2014-02-22 19:38:45 +00:00
parent a21f340553
commit caeb012843

View file

@ -8167,9 +8167,9 @@ int32_t loadlookups(int32_t fp, uint8_t **basepaltabptr)
if (kread(fp, &palnum, 1) != 1)
return -1;
if (palnum == 0)
if (palnum == 0 || palnum >= 256-RESERVEDPALS)
{
initprintf("ERROR: attempt to load lookup at pal 0\n");
initprintf("ERROR: attempt to load lookup at reserved pal %d\n", palnum);
return -1;
}