summaryrefslogtreecommitdiff
path: root/newgrf_station.c
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-05-09 06:52:28 +0000
committerpeter1138 <peter1138@openttd.org>2006-05-09 06:52:28 +0000
commitdd69f010b3c7e9572498082e486524955e4652a1 (patch)
tree1605917adfde816c30a5e573d14f34b1eaf7c438 /newgrf_station.c
parent8bb61ca472faeaa6a58f9a42aad03b4f99646470 (diff)
downloadopenttd-dd69f010b3c7e9572498082e486524955e4652a1.tar.xz
(svn r4786) - Newstations: in GetPlatformInfo() ensure negative values are only four bits
Diffstat (limited to 'newgrf_station.c')
-rw-r--r--newgrf_station.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/newgrf_station.c b/newgrf_station.c
index d35ffc51f..77e2a9c55 100644
--- a/newgrf_station.c
+++ b/newgrf_station.c
@@ -213,8 +213,8 @@ uint32 GetPlatformInfo(Axis axis, byte tile, int platforms, int length, int x, i
if (centred) {
x -= platforms / 2;
y -= length / 2;
- SB(retval, 0, 4, clamp(y, -8, 7));
- SB(retval, 4, 4, clamp(x, -8, 7));
+ SB(retval, 0, 4, y & 0xF);
+ SB(retval, 4, 4, x & 0xF);
} else {
SB(retval, 0, 4, y);
SB(retval, 4, 4, length - y - 1);