Mercurial > hg > openttd
diff src/vehicle.cpp @ 5748:d463e4aecd52 draft
(svn r8296) -Fix: GenerateVehicleSortList() tried to put a TileIndex into an uint16
-Fix: CmdMassStartStopVehicle() tried to put a TileIndex into an uint16
Those two bugs were unrelated to each other and unrelated to r8295, even though that commit touched the code in question
author | bjarni <bjarni@openttd.org> |
---|---|
date | Sun, 21 Jan 2007 01:25:59 +0000 |
parents | 61edd889181d |
children | b7c916fdba99 |
line wrap: on
line diff
--- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -1621,7 +1621,7 @@ } if (vehicle_list_window) { - uint16 id = GB(p1, 0, 16); + uint32 id = p1; uint16 window_type = p2 & VLW_MASK; engine_count = GenerateVehicleSortList((const Vehicle***)&vl, &engine_list_length, vehicle_type, _current_player, id, window_type); @@ -2369,7 +2369,7 @@ * @param window_type tells what kind of window the list is for. Use the VLW flags in vehicle_gui.h * @return the number of vehicles added to the list */ -uint GenerateVehicleSortList(const Vehicle ***sort_list, uint16 *length_of_array, byte type, PlayerID owner, uint16 index, uint16 window_type) +uint GenerateVehicleSortList(const Vehicle ***sort_list, uint16 *length_of_array, byte type, PlayerID owner, uint32 index, uint16 window_type) { const uint subtype = (type != VEH_Aircraft) ? Train_Front : 2; uint n = 0;