talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit d0c64a09767e097b52264d247b0c9a6486c92509
parent 373d079b4f9ac62ae1f9eaca202f29f9d4ed6b4a
Author: Colin Leroy <colin@colino.net>
Date:   Sun, 18 May 2014 20:42:04 +0200

Fix bug 3039 more - Why read line by line?

Diffstat:
Msrc/html.c | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/html.c b/src/html.c @@ -440,11 +440,13 @@ static SC_HTMLState sc_html_read_line(SC_HTMLParser *parser) gchar buf[SC_HTMLBUFSIZE]; gchar buf2[SC_HTMLBUFSIZE]; gint index; + gint n; if (parser->fp == NULL) return SC_HTML_EOF; - if (fgets(buf, sizeof(buf), parser->fp) == NULL) { + n = fread(buf, 1, sizeof(buf), parser->fp); + if (n == 0) { parser->state = SC_HTML_EOF; return SC_HTML_EOF; }