From 2f5e42c0fd9b4612dd098bb292fc4172d3d53a75 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Fri, 24 Jun 2022 19:00:38 +0300 Subject: [PATCH 61/61] AI: Fix tech want for paratroopers See osdn #44926 Signed-off-by: Marko Lindqvist --- ai/default/aiparatrooper.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ai/default/aiparatrooper.c b/ai/default/aiparatrooper.c index eb8260ee8f..06ed22ea9e 100644 --- a/ai/default/aiparatrooper.c +++ b/ai/default/aiparatrooper.c @@ -415,16 +415,16 @@ void dai_choose_paratrooper(struct ai_type *ait, continue; } - /* assign tech for paratroopers */ + /* Assign tech for paratroopers */ tech_req = advance_index(u_type->require_advance); if (tech_req != A_NONE && tech_req != A_UNSET) { for (i = 0; i < num_requirements; i++) { if (requirements[i] == tech_req) { - break; - } + break; + } } if (i == num_requirements) { - requirements[i++] = tech_req; + requirements[num_requirements++] = tech_req; } } -- 2.35.1