ignore empty lumps in W_ReadLump()

Do not even attempt to read empty lumps, because Windows' POSIX read()
implementation fails when passed a `NULL` buffer parameter, even though
the len parameter is also `0`.
This commit is contained in:
Fabian Greffrath 2022-09-08 16:36:56 +02:00
parent f1dd74940a
commit a7f35f0d84

View File

@ -436,7 +436,7 @@ void W_ReadLump(int lump, void *dest)
if (l->data) // killough 1/31/98: predefined lump data if (l->data) // killough 1/31/98: predefined lump data
memcpy(dest, l->data, l->size); memcpy(dest, l->data, l->size);
else else if (l->size) // [FG] ignore empty lumps
{ {
int c; int c;