lpcmanager

Fixed bug when forcing STRING variables

2013-05-07, Laurent Bessard
766ae7ffcb38
Parents 6676b16ba2cc
Children 3ee8dd509f01
Fixed bug when forcing STRING variables
--- a/LPCconnector/LPCAppObject.py Mon May 06 16:32:27 2013 +0200
+++ b/LPCconnector/LPCAppObject.py Tue May 07 12:27:35 2013 +0200
@@ -76,7 +76,7 @@
if force !=None:
c_type,unpack_func, pack_func = TypeTranslator.get(iectype, (None,None,None))
forced_type_size = ctypes.sizeof(c_type) \
- if iectype != "STRING" else len(force[-1])+1
+ if iectype != "STRING" else len(force)+1
forced_type_size_str = chr(forced_type_size)
forcestr = ctypes.string_at(
ctypes.pointer(