mirror of
https://gitee.com/openharmony/third_party_jsoncpp
synced 2024-12-04 05:26:28 +00:00
87ebbfad9c
Signed-off-by: 冉召宇 <ranzhaoyu1@huawei.com>
22 lines
671 B
Diff
22 lines
671 B
Diff
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;
|