diff options
-rw-r--r-- | src/newgrf_spritegroup.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/newgrf_spritegroup.cpp b/src/newgrf_spritegroup.cpp index 624b4d547..c6fcd0a9e 100644 --- a/src/newgrf_spritegroup.cpp +++ b/src/newgrf_spritegroup.cpp @@ -204,8 +204,8 @@ static U EvalAdjustT(const DeterministicSpriteGroupAdjust *adjust, ScopeResolver if (adjust->type != DSGA_TYPE_NONE) value += (S)adjust->add_val; switch (adjust->type) { - case DSGA_TYPE_DIV: value /= (S)adjust->divmod_val; break; - case DSGA_TYPE_MOD: value %= (U)adjust->divmod_val; break; + case DSGA_TYPE_DIV: value = (S)value / (S)adjust->divmod_val; break; + case DSGA_TYPE_MOD: value = (S)value % (S)adjust->divmod_val; break; case DSGA_TYPE_NONE: break; } |