diff --git a/src/rotating_gate.c b/src/rotating_gate.c index 22a0b0bdfa..36c23c2a56 100644 --- a/src/rotating_gate.c +++ b/src/rotating_gate.c @@ -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); }