Mercurial > touhou
diff pytouhou/vm/eclrunner.py @ 91:f7525fa66bb0
Fix ECL instruction 3
author | Thibaut Girka <thib@sitedethib.com> |
---|---|
date | Sun, 04 Sep 2011 10:19:42 +0200 |
parents | fda176f07d6d |
children | d167280a82fc |
line wrap: on
line diff
--- a/pytouhou/vm/eclrunner.py +++ b/pytouhou/vm/eclrunner.py @@ -166,9 +166,9 @@ class ECLRunner(object): Warning: the relative offset has been translated to an instruction pointer by the ECL parsing code (see pytouhou.formats.ecl). """ - counter_value = self._getval(variable_id) - if counter_value: - self._setval(variable_id, counter_value - 1) + counter_value = self._getval(variable_id) - 1 + if counter_value > 0: + self._setval(variable_id, counter_value) self.frame, self.instruction_pointer = frame, instruction_pointer