summaryrefslogtreecommitdiff
path: root/ai.c
diff options
context:
space:
mode:
Diffstat (limited to 'ai.c')
-rw-r--r--ai.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ai.c b/ai.c
index 74164a0e8..8abe5f655 100644
--- a/ai.c
+++ b/ai.c
@@ -3762,7 +3762,7 @@ static void AiStateRemoveTrack(Player *p)
uint tile = ++p->ai.state_counter;
// Iterated all tiles?
- if (tile == 0) {
+ if (tile >= MapSize()) {
p->ai.state = AIS_REMOVE_STATION;
return;
}