diff options
| author | 2018-09-19 18:24:12 -0400 | |
|---|---|---|
| committer | 2018-09-19 18:24:12 -0400 | |
| commit | a12f59bc78d8eab79d24e2e625a9a85b81c20a54 (patch) | |
| tree | f9d4bceac647f7f9ce335881f40be31169435349 /src/lib/base/Unicode.cpp | |
| parent | 7a723cbbf3b9ba1cf23ca67a08058b41e56831e8 (diff) | |
| parent | 68a36b3b67ec82cdd3f77e88e40d1043cbab5000 (diff) | |
Update upstream source from tag 'upstream/2.1.2+dfsg'
Update to upstream version '2.1.2+dfsg'
with Debian dir a655df7e32df947a70958a6a26869e4705733064
Diffstat (limited to 'src/lib/base/Unicode.cpp')
| -rw-r--r-- | src/lib/base/Unicode.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/lib/base/Unicode.cpp b/src/lib/base/Unicode.cpp index 6a077e7..90a166f 100644 --- a/src/lib/base/Unicode.cpp +++ b/src/lib/base/Unicode.cpp @@ -628,25 +628,25 @@ Unicode::fromUTF8(const UInt8*& data, UInt32& n) case 4: c = ((static_cast<UInt32>(data[0]) & 0x07) << 18) | ((static_cast<UInt32>(data[1]) & 0x3f) << 12) | - ((static_cast<UInt32>(data[1]) & 0x3f) << 6) | - ((static_cast<UInt32>(data[1]) & 0x3f) ); + ((static_cast<UInt32>(data[2]) & 0x3f) << 6) | + ((static_cast<UInt32>(data[3]) & 0x3f) ); break; case 5: c = ((static_cast<UInt32>(data[0]) & 0x03) << 24) | ((static_cast<UInt32>(data[1]) & 0x3f) << 18) | - ((static_cast<UInt32>(data[1]) & 0x3f) << 12) | - ((static_cast<UInt32>(data[1]) & 0x3f) << 6) | - ((static_cast<UInt32>(data[1]) & 0x3f) ); + ((static_cast<UInt32>(data[2]) & 0x3f) << 12) | + ((static_cast<UInt32>(data[3]) & 0x3f) << 6) | + ((static_cast<UInt32>(data[4]) & 0x3f) ); break; case 6: c = ((static_cast<UInt32>(data[0]) & 0x01) << 30) | ((static_cast<UInt32>(data[1]) & 0x3f) << 24) | - ((static_cast<UInt32>(data[1]) & 0x3f) << 18) | - ((static_cast<UInt32>(data[1]) & 0x3f) << 12) | - ((static_cast<UInt32>(data[1]) & 0x3f) << 6) | - ((static_cast<UInt32>(data[1]) & 0x3f) ); + ((static_cast<UInt32>(data[2]) & 0x3f) << 18) | + ((static_cast<UInt32>(data[3]) & 0x3f) << 12) | + ((static_cast<UInt32>(data[4]) & 0x3f) << 6) | + ((static_cast<UInt32>(data[5]) & 0x3f) ); break; default: |
