diff --git a/bindings/py3devil1.py b/bindings/py3devil1.py index fea35be..4e67102 100755 --- a/bindings/py3devil1.py +++ b/bindings/py3devil1.py @@ -6,6 +6,7 @@ import ctypes #--------------------------------------+ class PldHeader(ctypes.Structure): + _pack_ = 1 _fields_ = [ ("numOffset", ctypes.c_int), ("offsets", ctypes.POINTER(ctypes.c_int)) @@ -217,6 +218,10 @@ if __name__ == "__main__": data = f.read() devil1pld.getheader(ctypes.byref(pldheader), data) devil1pld.printheader(ctypes.byref(pldheader)) + print(pldheader) + print(pldheader.numOffset) + for i in range(0, pldheader.numOffset): + print(hex(pldheader.offsets[i])) def textest(devil1tex, texheader): with open("pl01.pld_1.txp", "rb") as f: