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.11.0, 2020-04-10 master, jgrpp-0.40.5, and all versions in-between/prior
Expected result
-t parameter is clamped to minimum value of 0 and a maximum value of 5000000.
Actual result
-t parameter accepts negative values (and values above 5000000) for the game starting year. When this happens and a new game is started, the following error is generated and (in case of dedicated server) the server aborts: ERROR: Map generation aborted...?... no suitable town locations
Using the Scenario Editor, it is possible to generate save games that have a negative year in the date, such as that found in the following save games/scenarios: negative year.zip
This can result in all sorts of undefined behavior, potentially leading to incorrect month names ("Vegetation -3458263" or "Top companies -1398716" or "[tooltip for an item] -5428763"), crashes/assertions (crash.zip), loan interest applying daily, broken temporal progression, etc.
Steps to reproduce
Run openttd -D ::1 -t -4000 which attempts to start a game in the year -3996 (instead of -4000 due to incorrect year to date conversion).
As no town buildings are able to spawn in years prior to the year 0, the map generation fails with ERROR: Map generation aborted...?... no suitable town locations.
Run openttd -t -4000
In game, open the console and run saveconfig then exit.
Run openttd without -t.
Notice that the starting year is properly clamped to 0.
The text was updated successfully, but these errors were encountered:
…ting year
causing all sorts of weird behaviour and crashes in map generation.
Now just set the appropriate setting via IConsoleSetSetting so the validation
and, if needed, clamping is performed on the starting year value.
…penTTD#9014)
An invalid starting year causes all sorts of weird behaviour and crashes in map generation.
Now just set the appropriate setting via IConsoleSetSetting so the validation
and, if needed, clamping is performed on the starting year value.
An invalid starting year causes all sorts of weird behaviour and crashes in map generation.
Now just set the appropriate setting via IConsoleSetSetting so the validation
and, if needed, clamping is performed on the starting year value.
Version of OpenTTD
1.11.0, 2020-04-10 master, jgrpp-0.40.5, and all versions in-between/prior
Expected result
-t
parameter is clamped to minimum value of 0 and a maximum value of 5000000.Actual result
-t
parameter accepts negative values (and values above 5000000) for the game starting year. When this happens and a new game is started, the following error is generated and (in case of dedicated server) the server aborts:ERROR: Map generation aborted...?... no suitable town locations
Using the Scenario Editor, it is possible to generate save games that have a negative year in the date, such as that found in the following save games/scenarios:
negative year.zip
This can result in all sorts of undefined behavior, potentially leading to incorrect month names ("Vegetation -3458263" or "Top companies -1398716" or "[tooltip for an item] -5428763"), crashes/assertions (crash.zip), loan interest applying daily, broken temporal progression, etc.
Steps to reproduce
openttd -D ::1 -t -4000
which attempts to start a game in the year -3996 (instead of -4000 due to incorrect year to date conversion).ERROR: Map generation aborted...?... no suitable town locations
.openttd -t -4000
saveconfig
thenexit
.openttd
without-t
.The text was updated successfully, but these errors were encountered: