runtime/PLCObject.py
changeset 1074 92a009dc5826
parent 1052 fa7c5034c1d2
child 1075 8078c01ae464
--- a/runtime/PLCObject.py	Fri Apr 26 23:08:41 2013 +0900
+++ b/runtime/PLCObject.py	Sun Apr 28 17:26:22 2013 +0900
@@ -471,7 +471,7 @@
                                 res.append(unpack_func(
                                             ctypes.cast(cursor,
                                              ctypes.POINTER(c_type)).contents))
-                                offset += ctypes.sizeof(c_type)
+                                offset += ctypes.sizeof(c_type) if iectype != "STRING" else len(res[-1])+1
                             else:
                                 if c_type is None:
                                     PLCprint("Debug error - " + iectype +