From cf95cb26395c5bdd4f163804123c6198a90b8e6d Mon Sep 17 00:00:00 2001 From: rubidium42 Date: Sun, 30 May 2021 14:38:55 +0200 Subject: [PATCH] Fix #9316, 64eddaeb: at about 250.000 inhabitants the bridge length limit check overflows (cherry picked from commit 4613ababd3fea832d5b11832784768323c39b5a9) --- src/town_cmd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp index 6e304e8da9..854c88192e 100644 --- a/src/town_cmd.cpp +++ b/src/town_cmd.cpp @@ -1334,7 +1334,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);