mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-25 13:55:36 -04:00
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:
parent
f1dd74940a
commit
a7f35f0d84
@ -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;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user