mirror of
https://github.com/robmcmullen/atrcopy.git
synced 2025-01-09 01:30:30 +00:00
Changed np.uint16 to '<u2' because can't assume we're running on a little-endian machine
This commit is contained in:
parent
5ddd6808fc
commit
3b7c4a8b66
@ -400,7 +400,7 @@ class AtariDosFile(object):
|
||||
first = True
|
||||
while pos < self.size:
|
||||
if pos + 1 < self.size:
|
||||
header, = bytes[pos:pos+2].view(dtype=np.uint16)
|
||||
header, = bytes[pos:pos+2].view(dtype='<u2')
|
||||
else:
|
||||
self.segments.append(ObjSegment(pos, pos + 1, 0, 1, bytes[pos:pos + 1], "Incomplete Data"))
|
||||
break
|
||||
@ -414,7 +414,7 @@ class AtariDosFile(object):
|
||||
if len(bytes[pos:pos + 4]) < 4:
|
||||
self.segments.append(ObjSegment(0, 0, bytes[pos:pos + 4], "Short Segment Header"))
|
||||
break
|
||||
start, end = bytes[pos:pos + 4].view(dtype=np.uint16)
|
||||
start, end = bytes[pos:pos + 4].view(dtype='<u2')
|
||||
count = end - start + 1
|
||||
found = len(bytes[pos + 4:pos + 4 + count])
|
||||
if found < count:
|
||||
|
Loading…
Reference in New Issue
Block a user