(svn r8749) -Regression r8331: fixed signed/unsigned issue that could create too many lines in build vehicle windows and crash the game
authorbjarni
Thu, 15 Feb 2007 20:58:45 +0000
changeset 6026 775982557e0e
parent 6025 414b34699e87
child 6027 ff15b8c7c087
(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
--- a/src/build_vehicle_gui.cpp	Thu Feb 15 20:35:45 2007 +0000
+++ b/src/build_vehicle_gui.cpp	Thu Feb 15 20:58:45 2007 +0000
@@ -931,7 +931,7 @@
 			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;
 	}