summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--train_gui.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/train_gui.c b/train_gui.c
index 6a848f3de..a9cf35f55 100644
--- a/train_gui.c
+++ b/train_gui.c
@@ -372,7 +372,7 @@ static int GetVehicleFromTrainDepotWndPt(Window *w, int x, int y, GetDepotVehicl
v->tile == w->window_number &&
v->u.rail.track == 0x80 &&
--row < 0) {
- area_x += w->hscroll.pos;
+ if (area_x >= 0) area_x += w->hscroll.pos;
goto found_it;
}
}