mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-07 06:46:43 +00:00
(svn r8749) -Regression r8331: fixed signed/unsigned issue that could create too many lines in build vehicle windows and crash the game
This commit is contained in:
parent
0697701b33
commit
6460d5b441
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user