Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vehicles can be overloaded if the station stops accepting cargo while it is unloaded #5583

Closed
DorpsGek opened this issue Jun 4, 2013 · 1 comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

DorpsGek commented Jun 4, 2013

fonsinchen opened the ticket and wrote:

As observed by Rubidium in http://www.tt-forums.net/viewtopic.php?f=33&t=41992&start=2780# p1078917 a vehicle can be left in an overloaded state when it's unloading cargo while at the same time having reserved some cargo and if during that time the station stops accepting the cargo being unloaded. This leads to an integer overflow in a different place and indirectly creates the problem of inflated reservation.

The attached patch makes sure that some reserved cargo is returned if cargo previously scheduled for unloading is kept instead. Additionally it adds an assert in ReserveConsist to make sure the sum of kept and reserved cargo is always <= the vechicles capacity.

Attachments

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/5583
@DorpsGek
Copy link
Member Author

DorpsGek commented Jun 8, 2013

fonsinchen closed the ticket.

Reason for closing: Fixed

In 25330


This comment was imported from FlySpray: https://bugs.openttd.org/task/5583

@DorpsGek DorpsGek closed this as completed Jun 8, 2013
@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) labels Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant