runtime/PLCObject.py
changeset 1074 92a009dc5826
parent 1052 fa7c5034c1d2
child 1075 8078c01ae464
equal deleted inserted replaced
1073:3cc7d6951cf4 1074:92a009dc5826
   469                                                         (None,None,None))
   469                                                         (None,None,None))
   470                             if c_type is not None and offset < size.value:
   470                             if c_type is not None and offset < size.value:
   471                                 res.append(unpack_func(
   471                                 res.append(unpack_func(
   472                                             ctypes.cast(cursor,
   472                                             ctypes.cast(cursor,
   473                                              ctypes.POINTER(c_type)).contents))
   473                                              ctypes.POINTER(c_type)).contents))
   474                                 offset += ctypes.sizeof(c_type)
   474                                 offset += ctypes.sizeof(c_type) if iectype != "STRING" else len(res[-1])+1
   475                             else:
   475                             else:
   476                                 if c_type is None:
   476                                 if c_type is None:
   477                                     PLCprint("Debug error - " + iectype +
   477                                     PLCprint("Debug error - " + iectype +
   478                                              " not supported !")
   478                                              " not supported !")
   479                                 #if offset >= size.value:
   479                                 #if offset >= size.value: