From 23e6d861fcdfd9c4f1b9eb85145a3410004983f4 Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Fri, 10 Jun 2022 17:56:56 +0100 Subject: [PATCH] VarAction2: Ensure that store simplification can't break var 7B --- src/newgrf.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/newgrf.cpp b/src/newgrf.cpp index ca035f8d9c..b6fef3ece7 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -6877,7 +6877,7 @@ static void OptimiseVarAction2DeterministicSpriteGroupSimplifyStores(Determinist } const DeterministicSpriteGroupAdjust &next = group->adjusts[j]; if (next.operation == DSGA_OP_RST) { - ok = true; + ok = (next.variable != 0x7B); break; } if (is_constant && next.operation == DSGA_OP_STO_NC) {