Fixed 'String too large' error in command-line tool. stable-1.5
authorFlorian Pose <fp@igh-essen.com>
Tue, 10 Apr 2012 18:56:50 +0200
branchstable-1.5
changeset 2375 ac3db27d60e0
parent 2228 71ebc81c6e43
child 2376 97ec7e18412e
Fixed 'String too large' error in command-line tool.
tool/DataTypeHandler.cpp
--- a/tool/DataTypeHandler.cpp	Mon Jan 09 15:16:40 2012 +0100
+++ b/tool/DataTypeHandler.cpp	Tue Apr 10 18:56:50 2012 +0200
@@ -186,9 +186,10 @@
         case 0x000a: // octet_string
         case 0x000b: // unicode_string
             dataSize = str.str().size();
-            if (dataSize >= targetSize) {
+            if (dataSize > targetSize) {
                 stringstream err;
-                err << "String too large";
+                err << "String too large ("
+                    << dataSize << " > " << targetSize << ")";
                 throw SizeException(err.str());
             }
             str >> (char *) target;