1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

Decode the second char from double glyph. When that char is splitted

by convert_string and that char is the beginning of double glyph too
we have a problem. This is a rare case. Must we care about it?
This commit is contained in:
Witold Filipczyk 2006-07-23 13:04:39 +02:00 committed by Witold Filipczyk
parent a3e0caca57
commit 7cb91c3213

View File

@ -454,7 +454,7 @@ set_hline(struct html_context *html_context, unsigned char *chars, int charslen,
continue; continue;
} else { } else {
unsigned char i; unsigned char i;
/* broken char */ broken_char: /* broken char */
for (i = 0; chars < end;i++) { for (i = 0; chars < end;i++) {
part->document->buf[i] = *chars++; part->document->buf[i] = *chars++;
} }
@ -467,7 +467,9 @@ good_char:
schar->data = (unicode_val_T)data; schar->data = (unicode_val_T)data;
part->char_width[x] = 2; part->char_width[x] = 2;
copy_screen_chars(&POS(x++, y), schar, 1); copy_screen_chars(&POS(x++, y), schar, 1);
schar->data = UCS_NO_CHAR; data = utf_8_to_unicode(&chars, end);
if (data == UCS_NO_CHAR) goto broken_char;
schar->data = (unicode_val_T)data;
part->spaces[x] = 0; part->spaces[x] = 0;
part->char_width[x] = 0; part->char_width[x] = 0;
} else { } else {