diff options
author | Chris Liddell <chris.liddell@artifex.com> | 2018-08-31 15:57:55 +0100 |
---|---|---|
committer | Chris Liddell <chris.liddell@artifex.com> | 2018-09-03 08:10:01 +0100 |
commit | 29f4603fc0c6de7d5df1f293f0a7efbffe8112bd (patch) | |
tree | f06d336b808cfb11ce819e3d268912538b00f29c /psi/zfapi.c | |
parent | 7ba6d80c69f0c74601ffc1077d27e0d1a299e57f (diff) | |
download | ghostpdl-29f4603fc0c6de7d5df1f293f0a7efbffe8112bd.tar.gz |
Bug 699693: Fix FAPI handling of multibyte Unicode code point
The original code worked for one byte code points, and for the case there the
original character code and Unicode value both had the same number of bytes,
but was totally wrong if the the two were different.
Diffstat (limited to 'psi/zfapi.c')
-rw-r--r-- | psi/zfapi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/psi/zfapi.c b/psi/zfapi.c index a34f8401a..48e1d548f 100644 --- a/psi/zfapi.c +++ b/psi/zfapi.c @@ -2298,7 +2298,7 @@ ps_get_glyphname_or_cid(gs_text_enum_t *penum, if (l > 0 && l < sizeof(uc)) { cc = 0; for (i = 0; i < l; i++) { - cc |= uc[i] << ((penum->bytes_decoded - 1) - i) * 8; + cc |= uc[l - 1 - i] << (i * 8); } ccode = cc; unicode_cp = true; |