Merge pull request #14 from ghewgill/windows

open memory files in binary mode
This commit is contained in:
James Tauber 2011-08-20 01:49:38 -07:00
commit aac75ef1cb

View File

@ -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)