From 9ffbf63716b69829d79df30c8319919cc5226c4a Mon Sep 17 00:00:00 2001 From: Greg Hewgill Date: Thu, 18 Aug 2011 21:21:42 +1200 Subject: [PATCH] open memory files in binary mode --- cpu6502.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpu6502.py b/cpu6502.py index 0a3064d..86e4cc6 100644 --- a/cpu6502.py +++ b/cpu6502.py @@ -25,7 +25,7 @@ class ROM: self._mem[address - self.start + offset] = datum def load_file(self, address, filename): - with open(filename) as f: + with open(filename, "rb") as f: for offset, datum in enumerate(f.read()): self._mem[address - self.start + offset] = ord(datum)