improve MoveParam to handle zeroed-out moves

This commit is contained in:
Bryan Bishop 2012-05-20 03:15:36 -05:00
parent 40000ca816
commit efd43a17b2
1 changed files with 5 additions and 1 deletions

View File

@ -1724,7 +1724,11 @@ class TrainerGroupParam(SingleByteParam):
class MoveParam(SingleByteParam):
def to_asm(self):
return moves[self.byte]
if self.byte in moves.keys():
return moves[self.byte]
else:
# this happens for move=0 (no move) in trainer headers
return str(self.byte)
class MenuDataPointerParam(PointerLabelParam):
#read menu data at the target site