From: Stas P Date: Tue, 14 Dec 2010 15:11:00 +0000 (+0300) Subject: fix array index overrun X-Git-Tag: 2.2~115^2~6 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=fa4cd8ef1eec9a5ec25cf574e29c3d33e11f3a9d;p=super-star-trek.git fix array index overrun --- 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():