From 0bddf96f7fc64687d5d39f1e1caa3b3c79127f92 Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Mon, 1 Aug 2022 18:27:21 +0100 Subject: [PATCH] VarAction2: Set variable for ABS op to avoid unused read from var 0 --- src/newgrf.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/newgrf.cpp b/src/newgrf.cpp index 334af7103b..7f2b6264b6 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -6330,6 +6330,7 @@ static bool TryMergeBoolMulCombineVarAction2Adjust(VarAction2OptimiseState &stat auto append_abs = [&]() { adjusts.emplace_back(); adjusts.back().operation = DSGA_OP_ABS; + adjusts.back().variable = 0x1A; state.inference |= VA2AIF_SIGNED_NON_NEGATIVE; };