diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-08-09 21:32:47 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-08-09 21:32:47 +0000 |
commit | fd7cede17e027a83de2aff3bc0f5ee875271e444 (patch) | |
tree | c1576d19a8e8c99ebbcf9dba4e75ef4665e631cc /core/fxcrt/cfx_utf8decoder.cpp | |
parent | 60627d6eafd025dde711e532eee6866840c04bef (diff) | |
download | pdfium-fd7cede17e027a83de2aff3bc0f5ee875271e444.tar.xz |
Move all utf8 decoding under fx_string.h
Put encoder in cfx_utf8encoder.{h,cpp} to parallel decoder.
Add tests, and fix one corner case involving 0xff.
Change-Id: Ib97540afdc708bcc6280a79c76734ec68ea72690
Reviewed-on: https://pdfium-review.googlesource.com/39770
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fxcrt/cfx_utf8decoder.cpp')
-rw-r--r-- | core/fxcrt/cfx_utf8decoder.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/fxcrt/cfx_utf8decoder.cpp b/core/fxcrt/cfx_utf8decoder.cpp index bee5e16da4..8adab5c602 100644 --- a/core/fxcrt/cfx_utf8decoder.cpp +++ b/core/fxcrt/cfx_utf8decoder.cpp @@ -43,5 +43,7 @@ void CFX_UTF8Decoder::Input(uint8_t byte) { } else if (byte < 0xfe) { m_PendingBytes = 5; m_PendingChar = (byte & 0x01) << 30; + } else { + m_PendingBytes = 0; } } |