Chromium Code Reviews| Index: core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp |
| diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp |
| index 1815d401949ba5aa25ee3b188cc6ea10e84c98da..255d0ce29cade6840340e5ac51253341f1a0985e 100644 |
| --- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp |
| +++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp |
| @@ -80,9 +80,9 @@ FX_DWORD _A85Decode(const uint8_t* src_buf, |
| pos = dest_size = 0; |
| while (pos < src_size) { |
| uint8_t ch = src_buf[pos++]; |
| - if (ch == '\n' || ch == '\r' || ch == ' ' || ch == '\t') { |
| + if (PDFCharIsLineEnding(ch) || ch == ' ' || ch == '\t') |
|
Tom Sepez
2015/10/28 17:17:21
How does this differ from the standard IsWhitespac
dsinclair
2015/10/28 18:05:07
std::isspace is more restrictive in that it also c
dsinclair
2015/10/28 18:32:06
For this one, it isn't spec compliant. The PDF spe
|
| continue; |
| - } |
| + |
| if (ch == 'z') { |
| FXSYS_memset(dest_buf + dest_size, 0, 4); |
| state = 0; |
| @@ -131,9 +131,9 @@ FX_DWORD _HexDecode(const uint8_t* src_buf, |
| FX_BOOL bFirstDigit = TRUE; |
| for (i = 0; i < src_size; i++) { |
| uint8_t ch = src_buf[i]; |
| - if (ch == ' ' || ch == '\n' || ch == '\t' || ch == '\r') { |
| + if (PDFCharIsLineEnding(ch) || ch == ' ' || ch == '\t') |
|
Tom Sepez
2015/10/28 17:17:21
ditto
dsinclair
2015/10/28 18:32:06
I think this is similar in that PDF doesn't list v
|
| continue; |
| - } |
| + |
| int digit; |
| if (ch <= '9' && ch >= '0') { |
| digit = ch - '0'; |