From 55d0f0ad9fad393eaf0ee3efbffceaa0719ec972 Mon Sep 17 00:00:00 2001 From: Ivan Savenko Date: Tue, 13 Dec 2022 15:17:42 +0200 Subject: [PATCH] Fixed infinite loop --- client/battle/BattleProjectileController.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/client/battle/BattleProjectileController.cpp b/client/battle/BattleProjectileController.cpp index 45bf477de..6932a9a06 100644 --- a/client/battle/BattleProjectileController.cpp +++ b/client/battle/BattleProjectileController.cpp @@ -225,9 +225,8 @@ void BattleProjectileController::emitStackProjectile(const CStack * stack) void BattleProjectileController::showProjectiles(Canvas & canvas) { - for ( auto it = projectiles.begin(); it != projectiles.end();) + for ( auto projectile: projectiles) { - auto projectile = *it; if ( projectile->playing ) projectile->show(canvas); }