Try to reduce warning spam.

This commit is contained in:
Shpoike 2023-04-11 08:25:15 +01:00
parent 695b979af9
commit 5082928f36

View file

@ -2625,7 +2625,7 @@ bspx_header_t *BSPX_Setup(model_t *mod, char *filebase, size_t filelen, lump_t *
} }
} }
if (offs < filelen && mod && !mod->archive && mod_loadmappackages.ival) if (offs < filelen && mod && !mod->archive && mod_loadmappackages.ival && filelen-offs > 22)//end-of-central-dir being 22 bytes sets a minimum zip size, which should slightly reduce false-positives.
{ //we have some sort of trailing junk... is it a zip?... { //we have some sort of trailing junk... is it a zip?...
Mod_LoadMapArchive(mod, filebase+offs, filelen-offs); Mod_LoadMapArchive(mod, filebase+offs, filelen-offs);
} }