From fa4cd8ef1eec9a5ec25cf574e29c3d33e11f3a9d Mon Sep 17 00:00:00 2001 From: Stas P Date: Tue, 14 Dec 2010 18:11:00 +0300 Subject: [PATCH] fix array index overrun --- sst.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sst.py b/sst.py index 94f8103..4b3fdfa 100755 --- a/sst.py +++ b/sst.py @@ -2692,11 +2692,9 @@ def kaboom(): skip(1) if len(game.enemies) != 0: whammo = 25.0 * game.energy - l=1 - while l <= len(game.enemies): + for l in range(len(game.enemies)): if game.enemies[l].power*game.enemies[l].kdist <= whammo: deadkl(game.enemies[l].location, game.quad[game.enemies[l].location.i][game.enemies[l].location.j], game.enemies[l].location) - l += 1 finish(FDILITHIUM) def killrate(): -- 2.31.1