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
1.10.0 (64 bit Windows 10)
NewGRF: big-train-2\sillytrain.grf version 1 (available as "Big Train" on bananas)
Expected result
No 16-bit unsigned integer overflow takes place when calculating the refit capacity, with a 32-bit integer being used instead. "New capacity: 262,136 passengers"
Actual result
A 16-bit unsigned integer overflow takes place when calculating the refit capacity. "New capacity: 65,528 passengers" (262,136 % 65,536 = 65,528)
Steps to reproduce
Build an electric rail depot.
Purchase "Big Train" once. This will refit it to Passengers by default.
Refit the train you purchased. Notice that there are several liveries available for each cargo.
Single-click to select another livery for Passengers, but don't click the refit button.
Look where it says "New capacity" and notice an integer overflow (65,528 passengers).
Click the refit button.
Open the details window of your train, select the Capacities tab.
Notice the correct value of 262,136 passengers is stored as the capacity.
The text was updated successfully, but these errors were encountered:
Version of OpenTTD
1.10.0 (64 bit Windows 10)
NewGRF: big-train-2\sillytrain.grf version 1 (available as "Big Train" on bananas)
Expected result
No 16-bit unsigned integer overflow takes place when calculating the refit capacity, with a 32-bit integer being used instead. "New capacity: 262,136 passengers"
Actual result
A 16-bit unsigned integer overflow takes place when calculating the refit capacity. "New capacity: 65,528 passengers" (262,136 % 65,536 = 65,528)
Steps to reproduce
The text was updated successfully, but these errors were encountered: