!63 patch冲突解决

Merge pull request !63 from 高超/0327
This commit is contained in:
openharmony_ci
2025-03-31 06:00:22 +00:00
committed by Gitee
3 changed files with 11 additions and 10 deletions
@@ -67,10 +67,10 @@ index a6a3f4e..896bf1b 100644
decoded = value;
return true;
}
@@ -1660,7 +1660,12 @@ bool OurReader::decodeDouble(Token& token, Value& decoded) {
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)) {
- return addError(
+ if (value == std::numeric_limits<double>::max())
+ value = std::numeric_limits<double>::infinity();
@@ -1,8 +1,8 @@
diff --git a/src/lib_json/json_reader.cpp b/src/lib_json/json_reader.cpp
index f233abb..8f4c544 100755
index 896bf1b..6624cb0 100644
--- a/src/lib_json/json_reader.cpp
+++ b/src/lib_json/json_reader.cpp
@@ -1666,6 +1666,12 @@ bool OurReader::decodeDouble(Token& token, Value& decoded) {
@@ -1654,6 +1654,12 @@ bool OurReader::decodeDouble(Token& token, Value& decoded) {
const String buffer(token.start_, token.end_);
IStringStream is(buffer);
if (!(is >> value)) {
@@ -12,6 +12,7 @@ index f233abb..8f4c544 100755
+ decoded = value;
+ return true;
+ }
return addError(
"'" + String(token.start_, token.end_) + "' is not a number.", token);
}
if (value == std::numeric_limits<double>::max())
value = std::numeric_limits<double>::infinity();
else if (value == std::numeric_limits<double>::lowest())
+1 -1
View File
@@ -51,8 +51,8 @@ def apply_patch(patch_file, target_dir):
def do_patch(args, target_dir):
patch_file = [
"Fix error whenparses the value of 5E-324 with libc++.patch",
"0001-Parse-large-floats-as-infinity-1349-1353.patch",
"Fix error whenparses the value of 5E-324 with libc++.patch",
"0001-Use-default-rather-than-hard-coded-8-for-maximum-agg.patch",
"Fix out-of-bounds read.patch"
]