From 1f543f6c18c2e6b73c0ff1ba62f08f9aeccb69b2 Mon Sep 17 00:00:00 2001 From: DeltaNedas <39013340+DeltaNedas@users.noreply.github.com> Date: Sat, 29 Aug 2020 16:18:40 +0000 Subject: [PATCH] fix #2460 (#2461) --- core/src/mindustry/logic/LExecutor.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/mindustry/logic/LExecutor.java b/core/src/mindustry/logic/LExecutor.java index 3b201e4809..dc5faff849 100644 --- a/core/src/mindustry/logic/LExecutor.java +++ b/core/src/mindustry/logic/LExecutor.java @@ -42,7 +42,8 @@ public class LExecutor{ vars[varTime].numval = Time.millis(); //reset to start - if(vars[varCounter].numval >= instructions.length) vars[varCounter].numval = 0; + if(vars[varCounter].numval >= instructions.length + || vars[varCounter].numval < 0) vars[varCounter].numval = 0; if(vars[varCounter].numval < instructions.length){ instructions[(int)(vars[varCounter].numval++)].run(this);