Browse Source

Fix endless loop

Fixed an endless-loop caused by someone removing this ", turn++".
Xilmi 1 year ago
parent
commit
068e3bdc59
1 changed files with 1 additions and 1 deletions
  1. 1 1
      AI/BattleAI/BattleExchangeVariant.cpp

+ 1 - 1
AI/BattleAI/BattleExchangeVariant.cpp

@@ -731,7 +731,7 @@ std::vector<const battle::Unit *> BattleExchangeEvaluator::getOneTurnReachableUn
 {
 	std::vector<const battle::Unit *> result;
 
-	for(int i = 0; i < turnOrder.size(); i++)
+	for(int i = 0; i < turnOrder.size(); i++, turn++)
 	{
 		auto & turnQueue = turnOrder[i];
 		HypotheticBattle turnBattle(env.get(), cb);