safe guard these functions

This should fix the brightmaps crash
This commit is contained in:
NepDisk 2024-09-05 18:26:59 -04:00
parent 12a8d5b709
commit ae0c0c3ca8

View file

@ -1116,6 +1116,9 @@ lumpnum_t W_CheckNumForName(const char *name)
{
INT32 i;
lumpnum_t check = INT16_MAX;
if (name == NULL)
return LUMPERROR;
if (!*name) // some doofus gave us an empty string?
return LUMPERROR;
@ -1163,6 +1166,9 @@ lumpnum_t W_CheckNumForLongName(const char *name)
{
INT32 i;
lumpnum_t check = INT16_MAX;
if (name == NULL)
return LUMPERROR;
if (!*name) // some doofus gave us an empty string?
return LUMPERROR;