LPCconnector/LPCAppObject.py
changeset 46 c6b7d4c176c2
parent 44 a6577420a27b
child 47 f860aa7e90e5
--- a/LPCconnector/LPCAppObject.py	Mon Apr 29 17:31:24 2013 +0900
+++ b/LPCconnector/LPCAppObject.py	Tue Apr 30 16:25:13 2013 +0900
@@ -75,7 +75,8 @@
                            ctypes.c_uint32(idx)),4)
                 if force !=None:
                     c_type,unpack_func, pack_func = TypeTranslator.get(iectype, (None,None,None))
-                    forced_type_size = ctypes.sizeof(c_type)
+                    forced_type_size = ctypes.sizeof(c_type) \
+                        if iectype != "STRING" else len(force[-1])+1
                     forced_type_size_str = chr(forced_type_size)
                     forcestr = ctypes.string_at(
                                 ctypes.pointer(