diff --git a/bindings/py3devil1pld.py b/bindings/py3devil1pld.py index bb4d54c..62ed79b 100644 --- a/bindings/py3devil1pld.py +++ b/bindings/py3devil1pld.py @@ -38,7 +38,8 @@ class pyPldHeader: # Store C Struct in order to call C functions self.cstruct = PldHeader() if filedata: - devil1pld.getheader(ctypes.byref(self.cstruct), filedata) + if not devil1pld.getheader(ctypes.byref(self.cstruct), filedata): + raise RuntimeError("failed to get .pld header") self.eof = len(filedata) def show(self):