From e9aa92d49e4359b1ed02cebeb252c88b9dd14707 Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Sun, 11 Dec 2022 16:08:38 +0000 Subject: [PATCH] Fix implicit 32 -> 64 operation warning in AnimationBase --- src/newgrf_animation_base.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/newgrf_animation_base.h b/src/newgrf_animation_base.h index c41b0639e1..063e23e7b9 100644 --- a/src/newgrf_animation_base.h +++ b/src/newgrf_animation_base.h @@ -69,7 +69,7 @@ struct AnimationBase { * increasing this value by one doubles the wait. 0 is the minimum value * allowed for animation_speed, which corresponds to 30ms, and 16 is the * maximum, corresponding to around 33 minutes. */ - if (_scaled_tick_counter % (1 << animation_speed) != 0) return; + if ((((uint32)_scaled_tick_counter) & ((1 << animation_speed) - 1)) != 0) return; uint8 frame = Tframehelper::Get(obj, tile); uint8 num_frames = spec->animation.frames;