FS#4921 - Unintended behaviour with ship depots and buoys

Attached to Project: OpenTTD
Opened by Luke Mil (Lukeno94) - Thursday, 29 December 2011, 16:43 GMT
Last edited by Michael Lutz (michi_cc) - Thursday, 29 December 2011, 20:11 GMT
Type Bug
Category Core
Status Closed
Assigned To No-one
Operating System All
Severity Medium
Priority Normal
Reported Version 1.2.0-beta1
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


I have observed in an online game that taking over a bankrupt company and selling their depot results in what appears to be a 32 bit overflow error (4,294,967,292) water tiles being owned by myself. If I then re-place the depot, it erroneously states that I own 0 water tiles. Also, buoys no longer show up in the list as they should do. When the overflow is combined with the "BaseCosts Mod 3.2.1." NewGRF, a massive source of income is generated as a result of this overflow - I do not know if it would generate this income without the overflow. Canals, however, act as they should do. Furthermore, the Details tab in the player's profile always assumes that all water pieces are canal pieces, regardless of if they are actually ship depots, buoys or actual canals.
This task depends upon

Closed by  Michael Lutz (michi_cc)
Thursday, 29 December 2011, 20:11 GMT
Reason for closing:  Fixed
Additional comments about closing:  In r23686.
Comment by Luke Mil (Lukeno94) - Thursday, 29 December 2011, 16:44 GMT
Interestingly, being disconnected from the server reset the issue - however, the buoys were still not counting as water tiles.
Comment by Michael Lutz (michi_cc) - Thursday, 29 December 2011, 20:04 GMT
Buoys aren't counted because they actually have no owner and can be used by any company, not just the company who built them.