VarAction2: Remove redundant and with 1 when value is already bool

This commit is contained in:
Jonathan G Rennison
2022-05-26 00:36:19 +01:00
parent 2f09eff404
commit 13cdef2a2d

View File

@@ -5781,6 +5781,12 @@ static void NewSpriteGroup(ByteReader *buf)
inference = VA2AIF_SIGNED_NON_NEGATIVE | VA2AIF_ONE_OR_ZERO;
break;
}
if (prev_inference & VA2AIF_ONE_OR_ZERO) {
/* Current value is already one or zero, remove this */
group->adjusts.pop_back();
inference = prev_inference;
break;
}
}
if (adjust.and_mask <= 1) {
inference = VA2AIF_SIGNED_NON_NEGATIVE | VA2AIF_ONE_OR_ZERO;