Fixed string argument for soe_write.
authorFlorian Pose <fp@igh-essen.com>
Tue, 09 Mar 2010 16:23:30 +0100
changeset 1867 fec951a0a654
parent 1866 02323e72efc9
child 1868 489ea0becd74
Fixed string argument for soe_write.
tool/CommandSoeWrite.cpp
--- a/tool/CommandSoeWrite.cpp	Tue Mar 09 16:17:51 2010 +0100
+++ b/tool/CommandSoeWrite.cpp	Tue Mar 09 16:23:30 2010 +0100
@@ -120,14 +120,14 @@
         memSize = dataType->byteSize;
     } else {
         // guess string type size
-        memSize = args[1].size();
+        memSize = args[1].size() + 1;
         if (!memSize) {
             err << "Empty argument not allowed.";
             throwInvalidUsageException(err);
         }
     }
 
-    ioctl.data = new uint8_t[memSize + 1];
+    ioctl.data = new uint8_t[memSize];
 
     try {
         ioctl.data_size = interpretAsType(