mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 22:31:05 +00:00
[util] Allow zero-sized lumps to be at end of file
This fixes a crash when attempting to load a map with no texture data.
This commit is contained in:
parent
70ece6d5bb
commit
dcfe0e33a3
1 changed files with 1 additions and 1 deletions
|
@ -683,7 +683,7 @@ do { \
|
|||
size_t size = LittleLong (bsp29->header->lumps[l].filelen); \
|
||||
size_t offs = LittleLong (bsp29->header->lumps[l].fileofs); \
|
||||
void *data = (byte *) mem + offs; \
|
||||
if (offs >= mem_size || (offs + size) > mem_size) \
|
||||
if (offs > mem_size || (offs + size) > mem_size) \
|
||||
Sys_Error ("invalid lump"); \
|
||||
bsp29->n = 0; \
|
||||
if (size) \
|
||||
|
|
Loading…
Reference in a new issue