summaryrefslogtreecommitdiff
path: root/src/viewport.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/viewport.cpp')
-rw-r--r--src/viewport.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/viewport.cpp b/src/viewport.cpp
index 62502802e..1a108924f 100644
--- a/src/viewport.cpp
+++ b/src/viewport.cpp
@@ -2356,7 +2356,7 @@ static void CalcRaildirsDrawstyle(TileHighlightData *thd, int x, int y, int meth
/* Calculate where a vertical line through the start point and
* a horizontal line from the selected end point intersect and
* use that point as the end point. */
- int offset = (raw_dx + raw_dy + TILE_SIZE) / 2;
+ int offset = (raw_dx + raw_dy + (int)TILE_SIZE) / 2;
x = thd->selstart.x - (offset & ~TILE_UNIT_MASK);
y = thd->selstart.y - (offset & ~TILE_UNIT_MASK);