From cfecbb3aabc1676b0d7fa66d80d8c1744861b243 Mon Sep 17 00:00:00 2001 From: gaochao Date: Tue, 25 Mar 2025 15:36:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=BC=8F=E6=B4=9E=E8=A1=A5=E4=B8=81=E5=90=88?= =?UTF-8?q?=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: gaochao --- 0001-Parse-large-floats-as-infinity-1349-1353.patch | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/0001-Parse-large-floats-as-infinity-1349-1353.patch b/0001-Parse-large-floats-as-infinity-1349-1353.patch index 2890925..791cd22 100644 --- a/0001-Parse-large-floats-as-infinity-1349-1353.patch +++ b/0001-Parse-large-floats-as-infinity-1349-1353.patch @@ -67,10 +67,10 @@ index a6a3f4e..896bf1b 100644 decoded = value; return true; } -@@ -1647,7 +1654,12 @@ bool OurReader::decodeDouble(Token& token, Value& decoded) { - const String buffer(token.start_, token.end_); - IStringStream is(buffer); - if (!(is >> value)) { +@@ -1660,7 +1660,12 @@ bool OurReader::decodeDouble(Token& token, Value& decoded) { + decoded = value; + return true; + } - return addError( + if (value == std::numeric_limits::max()) + value = std::numeric_limits::infinity(); -- Gitee