summaryrefslogtreecommitdiff
path: root/src/viewport.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2015-02-22 14:14:30 +0000
committerfrosch <frosch@openttd.org>2015-02-22 14:14:30 +0000
commitcfac8dbbc6076d9f782e8c406128686f58b428df (patch)
tree935aecf17d387a13f6b0c9aa2a724abcc01ddb4d /src/viewport.cpp
parentfc72d3dc8f848114287fef03208acacd9fdb4e96 (diff)
downloadopenttd-cfac8dbbc6076d9f782e8c406128686f58b428df.tar.xz
(svn r27160) -Fix: Division of signed values by TILE_SIZE requires cast to stay signed.
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 3fc14fcc7..228a67672 100644
--- a/src/viewport.cpp
+++ b/src/viewport.cpp
@@ -2569,7 +2569,7 @@ bool ScrollWindowTo(int x, int y, int z, Window *w, bool instant)
&& y >= 0 && y <= (int)MapSizeY() * (int)TILE_SIZE - 1) {
z = GetSlopePixelZ(x, y);
} else {
- z = TileHeightOutsideMap(x / TILE_SIZE, y / TILE_SIZE);
+ z = TileHeightOutsideMap(x / (int)TILE_SIZE, y / (int)TILE_SIZE);
}
}