From 6460d5b441884c76131df128872049a56b1f48b6 Mon Sep 17 00:00:00 2001 From: bjarni Date: Thu, 15 Feb 2007 20:58:45 +0000 Subject: (svn r8749) -Regression r8331: fixed signed/unsigned issue that could create too many lines in build vehicle windows and crash the game --- src/build_vehicle_gui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- cgit v1.2.3-70-g09d2