From 6e3b7f40be97975684de2e1552d51e8e8101b562 Mon Sep 17 00:00:00 2001 From: peter1138 Date: Tue, 9 May 2006 06:52:28 +0000 Subject: [PATCH] (svn r4786) - Newstations: in GetPlatformInfo() ensure negative values are only four bits --- newgrf_station.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/newgrf_station.c b/newgrf_station.c index d35ffc51fa..77e2a9c559 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);