From fdeec5e0a55818e551077e58562df697bf02edd0 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 6 Nov 2022 23:23:31 +0100 Subject: [PATCH] - fixed bad index check in CanWipe. This can be called with index == -1, which should check the first element of the intermission. --- wadsrc/static/zscript/engine/screenjob.zs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wadsrc/static/zscript/engine/screenjob.zs b/wadsrc/static/zscript/engine/screenjob.zs index e3fdc044d4..a339def91c 100644 --- a/wadsrc/static/zscript/engine/screenjob.zs +++ b/wadsrc/static/zscript/engine/screenjob.zs @@ -371,7 +371,7 @@ class ScreenJobRunner : Object UI bool CanWipe() { - if (index < jobs.Size()) return !jobs[index].nowipe; + if (index < jobs.Size()) return !jobs[max(0, index)].nowipe; return true; }