diff options
Diffstat (limited to 'core/fpdfapi/page/cpdf_streamparser.cpp')
-rw-r--r-- | core/fpdfapi/page/cpdf_streamparser.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/core/fpdfapi/page/cpdf_streamparser.cpp b/core/fpdfapi/page/cpdf_streamparser.cpp index aa1d227de0..2c7e0256f5 100644 --- a/core/fpdfapi/page/cpdf_streamparser.cpp +++ b/core/fpdfapi/page/cpdf_streamparser.cpp @@ -499,7 +499,13 @@ ByteString CPDF_StreamParser::ReadString() { status = 2; break; } - if (ch == 'n') { + if (ch == '\r') { + status = 4; + break; + } + if (ch == '\n') { + // Do nothing. + } else if (ch == 'n') { buf << '\n'; } else if (ch == 'r') { buf << '\r'; @@ -509,10 +515,6 @@ ByteString CPDF_StreamParser::ReadString() { buf << '\b'; } else if (ch == 'f') { buf << '\f'; - } else if (ch == '\r') { - status = 4; - break; - } else if (ch == '\n') { } else { buf << static_cast<char>(ch); } |