Allow fogpal DEF command to fogify pal 0.

git-svn-id: https://svn.eduke32.com/eduke32@2770 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2012-06-18 20:09:03 +00:00
parent d2e0909139
commit 8a28b3ad80
1 changed files with 3 additions and 2 deletions

View File

@ -13540,7 +13540,8 @@ void makepalookup(int32_t palnum, const char *remapbuf, int8_t r, int8_t g, int8
if (paletteloaded == 0)
return;
if (palnum==0 || (unsigned)palnum >= MAXPALOOKUPS)
// NOTE: palnum==0 is allowed
if ((unsigned)palnum >= MAXPALOOKUPS)
return;
if (remapbuf==NULL)
@ -13558,7 +13559,7 @@ void makepalookup(int32_t palnum, const char *remapbuf, int8_t r, int8_t g, int8
remapbuf = idmap;
}
if (palookup[palnum] == NULL || palookup[palnum] == palookup[0])
if (palookup[palnum] == NULL || (palnum!=0 && palookup[palnum] == palookup[0]))
{
//Allocate palookup buffer
palookup[palnum] = Bmalloc(numshades<<8);