Fix UB in RotatingGate_RotateInDirection

This commit is contained in:
ExpoSeed authored and huderlem committed 2021-05-11 10:12:01 -05:00
1 parent 40c13e97e7
commit 43854664b5
1 file changed
+2 -1
+2 -1
View File
@@ -670,7 +670,8 @@ static void RotatingGate_RotateInDirection(u8 gateId, u32 rotationDirection)
}
else
{
orientation = ++orientation % GATE_ORIENTATION_MAX;
orientation++;
orientation = orientation % GATE_ORIENTATION_MAX;
}
RotatingGate_SetGateOrientation(gateId, orientation);
}