summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium42 <rubidium@openttd.org>2021-05-30 14:38:55 +0200
committerrubidium42 <rubidium42@users.noreply.github.com>2021-05-30 15:09:18 +0200
commit4613ababd3fea832d5b11832784768323c39b5a9 (patch)
treea43392b463e5940a762305fb55815cbf8afa2936
parent0c968847006ba7206265651ac45f8fa0ce6141ac (diff)
downloadopenttd-4613ababd3fea832d5b11832784768323c39b5a9.tar.xz
Fix #9316, 64eddaeb: at about 250.000 inhabitants the bridge length limit check overflows
-rw-r--r--src/town_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp
index 627d133b5..bc29d3917 100644
--- a/src/town_cmd.cpp
+++ b/src/town_cmd.cpp
@@ -1178,7 +1178,7 @@ static bool GrowTownWithBridge(const Town *t, const TileIndex tile, const DiagDi
if (!(GetTownRoadBits(TileAddByDiagDir(tile, ReverseDiagDir(bridge_dir))) & DiagDirToRoadBits(bridge_dir))) return false;
/* We are in the right direction */
- uint8 bridge_length = 0; // This value stores the length of the possible bridge
+ int bridge_length = 0; // This value stores the length of the possible bridge
TileIndex bridge_tile = tile; // Used to store the other waterside
const int delta = TileOffsByDiagDir(bridge_dir);