From 4fb92b200af99888d324e95c55f390ffc400229b Mon Sep 17 00:00:00 2001 From: Tim Quatmann Date: Fri, 13 Mar 2020 17:49:26 +0100 Subject: [PATCH] Fix in parsing Numbers from JSON --- resources/3rdparty/modernjson/src/json.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/resources/3rdparty/modernjson/src/json.hpp b/resources/3rdparty/modernjson/src/json.hpp index e98b57a40..89f426b1a 100755 --- a/resources/3rdparty/modernjson/src/json.hpp +++ b/resources/3rdparty/modernjson/src/json.hpp @@ -9055,7 +9055,11 @@ Format](http://rfc7159.net/rfc7159) */ template FloatValueType str_to_float_t(FloatValueType* /* type */) const { - return storm::utility::convertNumber(std::string(reinterpret_cast(m_start))); + // Use std::strtod to get the position where the number ends. Then parse it as a rational Number + char const* strptr = reinterpret_cast(m_start); + char* end_pos; + std::strtod(strptr, &end_pos); + return storm::utility::convertNumber(std::string(strptr, end_pos - strptr)); } template <>