From: Eric S. Raymond Date: Tue, 23 Apr 2019 21:59:31 +0000 (-0400) Subject: Avotd crash due to bad array indexing. X-Git-Tag: 2.5~20 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=7a70a834627af16460c9ba15ddd29d3e6f4f92c3;p=super-star-trek.git Avotd crash due to bad array indexing. --- diff --git a/sst.py b/sst.py index a2cedc5..a990052 100755 --- a/sst.py +++ b/sst.py @@ -2775,7 +2775,8 @@ def nova(nov): finish(FNOVA) return # add in course nova contributes to kicking starship - bump += (game.sector-hits[-1]).sgn() + if hits: + bump += (game.sector-hits[-1]).sgn() elif iquad == 'K': # kill klingon deadkl(neighbor, iquad, neighbor) elif iquad in ('C','S','R'): # Damage/destroy big enemies