diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/disaster_cmd.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/disaster_cmd.cpp b/src/disaster_cmd.cpp index 37a2a3bb0..ccdd230ca 100644 --- a/src/disaster_cmd.cpp +++ b/src/disaster_cmd.cpp @@ -983,11 +983,11 @@ static void Disaster_CoalMine_Init() { TileIndex tile = i->xy; TileIndexDiff step = TileOffsByDiagDir((DiagDirection)GB(Random(), 0, 2)); - uint n; - for (n = 0; n < 30; n++) { + for (uint n = 0; n < 30; n++) { DisasterClearSquare(tile); - tile = TILE_MASK(tile + step); + tile += step; + if (!IsValidTile(tile)) break; } } return; |