From 5082928f3651292da2868c4ccba6662652c6a2b9 Mon Sep 17 00:00:00 2001 From: Shpoike Date: Tue, 11 Apr 2023 08:25:15 +0100 Subject: [PATCH] Try to reduce warning spam. --- engine/common/q1bsp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/common/q1bsp.c b/engine/common/q1bsp.c index 016bd9347..6123c869a 100644 --- a/engine/common/q1bsp.c +++ b/engine/common/q1bsp.c @@ -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?... Mod_LoadMapArchive(mod, filebase+offs, filelen-offs); }