From 26b3954bf631292a6cb580334e44531c5478e099 Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Wed, 17 May 2023 23:11:10 +0300 Subject: [PATCH] Bump progs execution runaway loop limit to 16M. The old limit (100000) can be hit in some new maps. The new limit (0x1000000) matches current vkQuake, whereas quakeforge and tyrquake has it as 1000000. Closes https://github.com/sezero/quakespasm/issues/58 --- Quake/pr_exec.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Quake/pr_exec.c b/Quake/pr_exec.c index 60355d24..be72a96c 100644 --- a/Quake/pr_exec.c +++ b/Quake/pr_exec.c @@ -383,7 +383,7 @@ void PR_ExecuteProgram (func_t fnum) { st++; /* next statement */ - if (++profile > 100000) + if (++profile > 0x1000000) /* was 100000 */ { pr_xstatement = st - pr_statements; PR_RunError("runaway loop error"); @@ -651,4 +651,3 @@ void PR_ExecuteProgram (func_t fnum) #undef OPA #undef OPB #undef OPC -