summaryrefslogtreecommitdiff
path: root/src/build_vehicle_gui.cpp
diff options
context:
space:
mode:
authorbjarni <bjarni@openttd.org>2007-02-15 20:58:45 +0000
committerbjarni <bjarni@openttd.org>2007-02-15 20:58:45 +0000
commita7c92492df16f1a99d05e696b14d3300ff4663f3 (patch)
tree153f3ac438174cefa0b2a1e9d2619b446f4dba67 /src/build_vehicle_gui.cpp
parente23396701957df3f20791ecacbd311a59b45f9f5 (diff)
downloadopenttd-a7c92492df16f1a99d05e696b14d3300ff4663f3.tar.xz
(svn r8749) -Regression r8331: fixed signed/unsigned issue that could create too many lines in build vehicle windows and crash the game
Diffstat (limited to 'src/build_vehicle_gui.cpp')
-rw-r--r--src/build_vehicle_gui.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/build_vehicle_gui.cpp b/src/build_vehicle_gui.cpp
index 283667f30..050d9bf5a 100644
--- a/src/build_vehicle_gui.cpp
+++ b/src/build_vehicle_gui.cpp
@@ -931,7 +931,7 @@ static void NewVehicleWndProc(Window *w, WindowEvent *e)
if (e->we.sizing.diff.x != 0) ResizeButtons(w, BUILD_VEHICLE_WIDGET_BUILD, BUILD_VEHICLE_WIDGET_RENAME);
if (e->we.sizing.diff.y == 0) break;
- w->vscroll.cap += e->we.sizing.diff.y / GetVehicleListHeight(bv->vehicle_type);
+ w->vscroll.cap += e->we.sizing.diff.y / (int)GetVehicleListHeight(bv->vehicle_type);
w->widget[BUILD_VEHICLE_WIDGET_LIST].data = (w->vscroll.cap << 8) + 1;
break;
}