diff options
Diffstat (limited to 'src/ai/api/ai_industrytype.cpp')
-rw-r--r-- | src/ai/api/ai_industrytype.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ai/api/ai_industrytype.cpp b/src/ai/api/ai_industrytype.cpp index 095aaa45f..83d356a3c 100644 --- a/src/ai/api/ai_industrytype.cpp +++ b/src/ai/api/ai_industrytype.cpp @@ -56,7 +56,7 @@ const IndustrySpec *ins = ::GetIndustrySpec(industry_type); AIList *list = new AIList(); - for (int i = 0; i < 2; i++) { + for (size_t i = 0; i < lengthof(ins->produced_cargo); i++) { if (ins->produced_cargo[i] != CT_INVALID) list->AddItem(ins->produced_cargo[i], 0); } @@ -70,7 +70,7 @@ const IndustrySpec *ins = ::GetIndustrySpec(industry_type); AIList *list = new AIList(); - for (int i = 0; i < 3; i++) { + for (size_t i = 0; i < lengthof(ins->accepts_cargo); i++) { if (ins->accepts_cargo[i] != CT_INVALID) list->AddItem(ins->accepts_cargo[i], 0); } |