From be8c01946ab1a1d4b79fdc5358541d630f14dc0a Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Wed, 20 Apr 2022 09:29:09 +0200 Subject: lcCT: use the correct index for checking the second byte MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (Not that it will make any difference, as the checking of these high bits looks like an excess of precaution.) This fixes issue #134. Reported-by: RafaƂ Mikrut Signed-off-by: Benno Schulenberg --- src/xlibi18n/lcCT.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xlibi18n/lcCT.c b/src/xlibi18n/lcCT.c index 2ffb0097..9e797036 100644 --- a/src/xlibi18n/lcCT.c +++ b/src/xlibi18n/lcCT.c @@ -620,7 +620,7 @@ _XlcCheckCTSequence( return resOK; case XctExtSeg: if (tmp_ctext_len > 2 - && (tmp_ctext[0] & 0x80) && (tmp_ctext[0] & 0x80)) { + && (tmp_ctext[0] & 0x80) && (tmp_ctext[1] & 0x80)) { unsigned int msb = tmp_ctext[0] & 0x7f; unsigned int lsb = tmp_ctext[1] & 0x7f; ext_seg_left = (msb << 7) + lsb; -- cgit v1.2.1