a thing
This commit is contained in:
parent
bf4b632ed9
commit
d80a7175a2
1 changed files with 3 additions and 11 deletions
14
kernel.py
14
kernel.py
|
@ -113,10 +113,7 @@ class GCT(object):
|
||||||
arraylength = int.from_bytes(info, byteorder='big', signed=False)
|
arraylength = int.from_bytes(info, byteorder='big', signed=False)
|
||||||
padding = get_alignment(arraylength, 8)
|
padding = get_alignment(arraylength, 8)
|
||||||
|
|
||||||
while arraylength > 0:
|
dolFile.write(self.codeList.read(arraylength))
|
||||||
value = self.codeList.read(1)
|
|
||||||
dolFile.write(value)
|
|
||||||
arraylength -= 1
|
|
||||||
|
|
||||||
self.codeList.seek(padding, 1)
|
self.codeList.seek(padding, 1)
|
||||||
continue
|
continue
|
||||||
|
@ -169,16 +166,11 @@ class GCT(object):
|
||||||
break
|
break
|
||||||
|
|
||||||
self.codeList.seek(-8, 1)
|
self.codeList.seek(-8, 1)
|
||||||
|
codelist += self.codeList.read(GCT.determine_codelength(codetype, info))
|
||||||
length = GCT.determine_codelength(codetype, info)
|
|
||||||
while length > 0:
|
|
||||||
codelist += self.codeList.read(1)
|
|
||||||
length -= 1
|
|
||||||
|
|
||||||
except (RuntimeError, UnmappedAddressError):
|
except (RuntimeError, UnmappedAddressError):
|
||||||
self.codeList.seek(-8, 1)
|
self.codeList.seek(-8, 1)
|
||||||
length = GCT.determine_codelength(codetype, info)
|
codelist += self.codeList.read(GCT.determine_codelength(codetype, info))
|
||||||
codelist += self.codeList.read(length)
|
|
||||||
|
|
||||||
self.codeList = BytesIO(codelist)
|
self.codeList = BytesIO(codelist)
|
||||||
self.size = len(self.codeList.getbuffer())
|
self.size = len(self.codeList.getbuffer())
|
||||||
|
|
Reference in a new issue