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:
parent
a3e0caca57
commit
7cb91c3213
@ -454,7 +454,7 @@ set_hline(struct html_context *html_context, unsigned char *chars, int charslen,
|
||||
continue;
|
||||
} else {
|
||||
unsigned char i;
|
||||
/* broken char */
|
||||
broken_char: /* broken char */
|
||||
for (i = 0; chars < end;i++) {
|
||||
part->document->buf[i] = *chars++;
|
||||
}
|
||||
@ -467,7 +467,9 @@ good_char:
|
||||
schar->data = (unicode_val_T)data;
|
||||
part->char_width[x] = 2;
|
||||
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->char_width[x] = 0;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user