Changeset - r23222:d7356d836ac7
[Not reviewed]
master
0 1 0
glx22 - 5 years ago 2019-01-28 16:16:19
glx22@users.noreply.github.com
Fix #7112, fef8b831a9: incorrect precondition check (#7127)
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/script/api/script_town.cpp
Show inline comments
 
@@ -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;
0 comments (0 inline, 0 general)