• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1diff --git a/src/lib_json/json_reader.cpp b/src/lib_json/json_reader.cpp
2index f233abb..8f4c544 100755
3--- a/src/lib_json/json_reader.cpp
4+++ b/src/lib_json/json_reader.cpp
5@@ -1666,6 +1666,12 @@ bool OurReader::decodeDouble(Token& token, Value& decoded) {
6   const String buffer(token.start_, token.end_);
7   IStringStream is(buffer);
8   if (!(is >> value)) {
9+    // the value could be lower than numeric_limits<double>::min(), in this situtation we should return the value with the gurantee
10+    // of conversion which has been performed and no occurances of range error.
11+    if ((value > 0 && value < std::numeric_limits<double>::min()) || (value < 0 && value > -std::numeric_limits<double>::min())) {
12+      decoded = value;
13+      return true;
14+    }
15     return addError(
16         "'" + String(token.start_, token.end_) + "' is not a number.", token);
17   }
18