FIX: ValueError: chr() arg not in range(256)

This commit is contained in:
Julien Palard 2011-10-08 15:56:23 +02:00
parent 16807577be
commit cfbf2fdb14
1 changed files with 2 additions and 2 deletions

View File

@ -41,8 +41,8 @@ class Machine:
def get_integer(self):
parameter = 0
while chr(self.mem[self.exc_ptr + 1]) >= '0' \
and chr(self.mem[self.exc_ptr + 1]) <= '9':
while self.mem[self.exc_ptr + 1] >= 0x30 \
and self.mem[self.exc_ptr + 1] <= 0x39:
self.exc_ptr += 1
if not self.cycle():
return parameter