update Fix.patch.

Signed-off-by: 冉召宇 <ranzhaoyu1@huawei.com>
This commit is contained in:
冉召宇 2024-09-18 02:19:36 +00:00 committed by Gitee
parent 38f6519eac
commit 8786851010
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -0,0 +1,21 @@
diff --git a/src/lib_json/json_reader.cpp b/src/lib_json/json_reader.cpp
--- a/src/lib_json/json_reader.cpp
+++ b/src/lib_json/json_reader.cpp
@@ -773,7 +773,7 @@
while (current < location && current != end_) {
Char c = *current++;
if (c == '\r') {
- if (*current == '\n')
+ if (current != end_ && *current == '\n')
++current;
lastLineStart = current;
++line;
@@ -1826,7 +1826,7 @@
while (current < location && current != end_) {
Char c = *current++;
if (c == '\r') {
- if (*current == '\n')
+ if (current != end_ && *current == '\n')
++current;
lastLineStart = current;
++line;