You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently a VehicleOrderID is a byte, so it cannot be higher than 255. This limit, however, is not enforced anywhere. This leads to an overflow of OrderList->num_orders. An order count of exactly 255 could be even worse, as it marks the Orderlist as invalid.
The attached patch fixes this by adding a check in CmdInsertOrder, which limits the number of orders to 254 (INVALID_VEH_ORDER_ID - 1)
I can't see why anyone would ever add so many orders, but I think it's better to have this fixed.
Swallow opened the ticket and wrote:
Attachments
Reported version: trunk
Operating system: All
This issue was imported from FlySpray: https://bugs.openttd.org/task/2495
The text was updated successfully, but these errors were encountered: