FIX: ValueError: chr() arg not in range(256)
This commit is contained in:
parent
16807577be
commit
cfbf2fdb14
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue