diff -r af7350d24ab5 -r 73a53278833b runtime/PLCObject.py --- a/runtime/PLCObject.py Sun Dec 06 18:52:50 2009 +0100 +++ b/runtime/PLCObject.py Sun Dec 06 19:06:36 2009 +0100 @@ -392,10 +392,16 @@ ctypes.POINTER(c_type)).contents)) offset += ctypes.sizeof(c_type) else: - PLCprint("Debug error !") + if c_type is None: + PLCprint("Debug error - " + iectype + " not supported !") + if offset >= size: + PLCprint("Debug error - buffer too small !") break self._FreeDebugData() self.PLClibraryLock.release() - return self.PLCStatus, tick.value, res + if offset == size: + return self.PLCStatus, tick.value, res + else: + PLCprint("Debug error - bad buffer unpack !") return self.PLCStatus, None, None