Fix for incorrect ObjSegment call when there's a short segment header

This commit is contained in:
Rob McMullen 2016-05-04 11:18:50 -07:00
parent b977322a4e
commit bc7097dfd0

View File

@ -175,7 +175,7 @@ class AtariDosFile(object):
raise InvalidBinaryFile
first = False
if len(b[pos:pos + 4]) < 4:
self.segments.append(ObjSegment(r[pos:pos + 4], 0, 0, "Short Segment Header"))
self.segments.append(ObjSegment(r[pos:pos + 4], 0, 0, 0, len(b[pos:pos + 4]), "Short Segment Header"))
break
start, end = b[pos:pos + 4].view(dtype='<u2')
count = end - start + 1