summaryrefslogtreecommitdiffstats
path: root/vespalib
diff options
context:
space:
mode:
authorArne H Juul <arnej27959@users.noreply.github.com>2023-12-13 12:45:10 +0100
committerGitHub <noreply@github.com>2023-12-13 12:45:10 +0100
commitfc48d57ddad1ecae78748d47d2db5c3d05c76f59 (patch)
tree6b73f698ae721ea2134a11d213144712677cc402 /vespalib
parent32b8a74701ade63457977a36aaa56cdcc5ddaf0a (diff)
parent6d32c4bfc58cd3ee9d3c88e6f694284287054fd1 (diff)
Merge pull request #29515 from vespa-engine/arnej/parse-special-number-strings
add parsing of special strings for inf/nan cell values
Diffstat (limited to 'vespalib')
-rw-r--r--vespalib/src/vespa/vespalib/data/slime/json_format.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/vespalib/src/vespa/vespalib/data/slime/json_format.cpp b/vespalib/src/vespa/vespalib/data/slime/json_format.cpp
index 9e4ba14e231..a5c7d31a046 100644
--- a/vespalib/src/vespa/vespalib/data/slime/json_format.cpp
+++ b/vespalib/src/vespa/vespalib/data/slime/json_format.cpp
@@ -492,7 +492,7 @@ insertNumber(Inserter &inserter, bool isLong, const vespalib::string & value, ch
inserter.insertLong(val);
} else {
double val = locale::c::strtod_au(value.c_str(), endp);
- errorCode = errno;
+ errorCode = (errno == ERANGE ? 0 : errno);
inserter.insertDouble(val);
}
assert(errorCode == 0 || errorCode == ERANGE || errorCode == EINVAL);