diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2018-10-23 12:14:51 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2018-10-23 12:14:51 +0200 |
commit | 2eb4a65ebd9aa04bd663fb9a7f0680fd2c56e990 (patch) | |
tree | eb5f9616387784ec1a5914395a9e3355baca2ce4 /nx-X11/lib/src/xlibi18n/lcCT.c | |
parent | 3dc4595560b34242fe4705af8c93d0024eeb2c56 (diff) | |
parent | 701e702a121029098a6123bee9e43a9b81f4b3d9 (diff) | |
download | nx-libs-2eb4a65ebd9aa04bd663fb9a7f0680fd2c56e990.tar.gz nx-libs-2eb4a65ebd9aa04bd663fb9a7f0680fd2c56e990.tar.bz2 nx-libs-2eb4a65ebd9aa04bd663fb9a7f0680fd2c56e990.zip |
Merge branch 'uli42-pr/libX11_1.6.6' into 3.6.x
Attributes GH PR #722: https://github.com/ArcticaProject/nx-libs/pull/722
Diffstat (limited to 'nx-X11/lib/src/xlibi18n/lcCT.c')
-rw-r--r-- | nx-X11/lib/src/xlibi18n/lcCT.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/nx-X11/lib/src/xlibi18n/lcCT.c b/nx-X11/lib/src/xlibi18n/lcCT.c index 6e3f21e92..a2ff93c8a 100644 --- a/nx-X11/lib/src/xlibi18n/lcCT.c +++ b/nx-X11/lib/src/xlibi18n/lcCT.c @@ -1021,19 +1021,19 @@ cstoct( ) { while (csstr_len > 0 && ct_len > 0) { unsigned char ch = * (const unsigned char *) csptr; - int char_size = (ch < 0xc0 ? 1 : + int ch_size = (ch < 0xc0 ? 1 : ch < 0xe0 ? 2 : ch < 0xf0 ? 3 : ch < 0xf8 ? 4 : ch < 0xfc ? 5 : 6); int i; - if (!(csstr_len >= char_size && ct_len >= char_size)) + if (!(csstr_len >= ch_size && ct_len >= ch_size)) break; - for (i = char_size; i > 0; i--) + for (i = ch_size; i > 0; i--) *ctptr++ = *csptr++; - csstr_len -= char_size; - ct_len -= char_size; + csstr_len -= ch_size; + ct_len -= ch_size; } } else { while (csstr_len > 0 && ct_len > 0) { |