From dcdf3b79b2baef1647005715ca9fe2bb40f28d91 Mon Sep 17 00:00:00 2001 From: terminx Date: Fri, 4 May 2018 22:42:42 +0000 Subject: [PATCH] Ignore cache size setting in .cfg if the value is less than the hard-coded default git-svn-id: https://svn.eduke32.com/eduke32@6878 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/duke3d/src/config.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/duke3d/src/config.cpp b/source/duke3d/src/config.cpp index a1d1465c7..705fa8305 100644 --- a/source/duke3d/src/config.cpp +++ b/source/duke3d/src/config.cpp @@ -615,7 +615,10 @@ int32_t CONFIG_ReadSetup(void) SCRIPT_GetNumber(ud.config.scripthandle, "Setup", "ConfigVersion", &ud.configversion); SCRIPT_GetNumber(ud.config.scripthandle, "Setup", "ForceSetup", &ud.config.ForceSetup); SCRIPT_GetNumber(ud.config.scripthandle, "Setup", "NoAutoLoad", &ud.config.NoAutoLoad); - SCRIPT_GetNumber(ud.config.scripthandle, "Setup", "CacheSize", &MAXCACHE1DSIZE); + SCRIPT_GetNumber(ud.config.scripthandle, "Setup", "CacheSize", &dummy); + + if (dummy > MAXCACHE1DSIZE) + MAXCACHE1DSIZE = dummy; if (g_noSetup == 0 && g_modDir[0] == '/') {