From 34113a8770585b9eb13fe7ad1bbb91748e525837 Mon Sep 17 00:00:00 2001
From: johns <>
Date: Mon, 19 Mar 2001 02:00:57 +0000
Subject: [PATCH] Fixed bug: didn't take the real end of unit-types.

---
 src/ai/old_ai.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/ai/old_ai.cpp b/src/ai/old_ai.cpp
index e00bb9e9d..8cb7191e5 100644
--- a/src/ai/old_ai.cpp
+++ b/src/ai/old_ai.cpp
@@ -1587,7 +1587,7 @@ global void AiInit(Player * player)
     //
     //  Adjust costs for AI Player
     //
-    for (i = 0; i < UnitTypeInternalMax; ++i) {
+    for (i = 0; UnitTypes[i].OType; ++i) {
 	for (j = 0; j < MaxCosts; ++j) {
 	    UnitTypes[i].Stats[player->Player].Costs[j] *=
 		    j == TimeCost ? AiTimeFactor : AiCostFactor;