diff options
author | glx22 <glx22@users.noreply.github.com> | 2019-01-28 17:16:19 +0100 |
---|---|---|
committer | Ingo von Borstel <github@planetmaker.de> | 2019-01-28 17:16:19 +0100 |
commit | b28a6784363254de49cc95747c4aada7477d8338 (patch) | |
tree | b8955ca766fa7d3d6f7817f9e4741c5d97ba4bf3 /src | |
parent | 654b635f6fb866fcc3ccabcf8333f3b7495ebb26 (diff) | |
download | openttd-b28a6784363254de49cc95747c4aada7477d8338.tar.xz |
Fix #7112, fef8b831a9: incorrect precondition check (#7127)
Diffstat (limited to 'src')
-rw-r--r-- | src/script/api/script_town.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/script/api/script_town.cpp b/src/script/api/script_town.cpp index 4cdd6a9d0..64f8e166e 100644 --- a/src/script/api/script_town.cpp +++ b/src/script/api/script_town.cpp @@ -170,7 +170,7 @@ break; default: - EnforcePrecondition(false, days_between_town_growth <= MAX_TOWN_GROWTH_TICKS); + EnforcePrecondition(false, (days_between_town_growth * DAY_TICKS / TOWN_GROWTH_TICKS) <= MAX_TOWN_GROWTH_TICKS); /* Don't use growth_rate 0 as it means GROWTH_NORMAL */ growth_rate = max(days_between_town_growth * DAY_TICKS, 2u) - 1; break; |