Fix UB in RotatingGate_RotateInDirection

This commit is contained in:
ExpoSeed
2021-05-07 13:50:50 -05:00
committed by huderlem
parent 40c13e97e7
commit 43854664b5
+2 -1
View File
@@ -670,7 +670,8 @@ static void RotatingGate_RotateInDirection(u8 gateId, u32 rotationDirection)
} }
else else
{ {
orientation = ++orientation % GATE_ORIENTATION_MAX; orientation++;
orientation = orientation % GATE_ORIENTATION_MAX;
} }
RotatingGate_SetGateOrientation(gateId, orientation); RotatingGate_SetGateOrientation(gateId, orientation);
} }