Ver código fonte

Merge pull request #6959 from afishbeck/fixJSONBigNumberSize

HPCC-12961 Fix check for JSON BigNumber size too low

Reviewed-by: Gavin Halliday <ghalliday@hpccsystems.com>
Gavin Halliday 10 anos atrás
pai
commit
ab5296fd3e

+ 1 - 1
common/thorhelper/roxiehelper.cpp

@@ -1214,7 +1214,7 @@ void FlushingJsonBuffer::setScalarInt(const char *resultName, unsigned sequence,
 void FlushingJsonBuffer::setScalarUInt(const char *resultName, unsigned sequence, unsigned __int64 value, unsigned size)
 {
     startScalar(resultName, sequence);
-    if (size < 6) //JavaScript doesn't support unsigned, and only supports 53 significant bits
+    if (size < 7) //JavaScript doesn't support unsigned, and only supports 53 significant bits
         s.append(value);
     else
         s.append('"').append(value).append('"');

+ 1 - 1
common/thorhelper/thorxmlwrite.cpp

@@ -501,7 +501,7 @@ void CommonJsonWriter::outputInt(__int64 field, unsigned size, const char *field
 }
 void CommonJsonWriter::outputUInt(unsigned __int64 field, unsigned size, const char *fieldname)
 {
-    if (size < 6) //JavaScript doesn't support unsigned, and only supports 53 significant bits
+    if (size < 7) //JavaScript doesn't support unsigned, and only supports 53 significant bits
     {
         checkDelimit();
         appendJSONValue(out, checkItemName(fieldname), field);