lcCT: use the correct index for checking the second byte

(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 <bensberg@telfort.nl>
This commit is contained in:
Benno Schulenberg 2022-04-20 09:29:09 +02:00
parent 488b156fe2
commit be8c01946a

View file

@ -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;