From faf16a35f9eb3c2cf96066a969dd9f24bf9dd0b4 Mon Sep 17 00:00:00 2001 From: duncanspumpkin Date: Thu, 18 Feb 2016 22:16:51 +0000 Subject: [PATCH] Fix #2972. Station lengths now correctly calculated. Issue caused by counting number of stations off by one. This would cause the calculator to return 1 even on failure after a station element being removed. --- src/ride/track.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ride/track.c b/src/ride/track.c index 5a2ee39cb6..8c74bcc7b5 100644 --- a/src/ride/track.c +++ b/src/ride/track.c @@ -4242,7 +4242,7 @@ static bool track_remove_station_element(int x, int y, int z, int direction, int int stationY0 = y; int stationX1 = x; int stationY1 = y; - int stationLength = 1; + int stationLength = 0; int byte_F441D1 = -1; rct_ride *ride = get_ride(rideIndex);