Mercurial > touhou
comparison pytouhou/vm/anmrunner.py @ 129:284ac8f97a96
Fix potential crash
author | Thibaut Girka <thib@sitedethib.com> |
---|---|
date | Sat, 10 Sep 2011 18:33:45 +0200 |
parents | 174324a4da51 |
children | e7902309305c |
comparison
equal
deleted
inserted
replaced
128:8ba018617829 | 129:284ac8f97a96 |
---|---|
56 | 56 |
57 if frame == self.frame: | 57 if frame == self.frame: |
58 try: | 58 try: |
59 callback = self._handlers[opcode] | 59 callback = self._handlers[opcode] |
60 except KeyError: | 60 except KeyError: |
61 logger.warn('unhandled opcode %d (args: %r)', instr_type, args) | 61 logger.warn('unhandled opcode %d (args: %r)', opcode, args) |
62 else: | 62 else: |
63 callback(self, *args) | 63 callback(self, *args) |
64 sprite._changed = True | 64 sprite._changed = True |
65 self.frame += 1 | 65 self.frame += 1 |
66 | 66 |