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

set_hline: Add a FIXME comment about invalid UTF-8.

This commit is contained in:
Kalle Olavi Niemitalo 2006-12-26 14:59:16 +02:00 committed by Kalle Olavi Niemitalo
parent cd10da6f31
commit a287f547fd

View File

@ -440,6 +440,16 @@ set_hline(struct html_context *html_context, unsigned char *chars, int charslen,
part->document->buf[i] = '\0';
data = utf8_to_unicode(&buf_ptr, buf_ptr + i);
if (data != UCS_NO_CHAR) {
/* FIXME: If there was invalid
* UTF-8 in the buffer,
* @utf8_to_unicode may have left
* some bytes unused. Those
* bytes should be pulled back
* into @chars, rather than
* discarded. This is not
* trivial to implement because
* each byte may have arrived in
* a separate call. */
part->document->buf_length = 0;
goto good_char;
} else {