From: Thomas Roessler Date: Mon, 12 Feb 2001 10:28:25 +0000 (+0000) Subject: Avoid an infinite loop in the pager. From Edmund Grimley Evans. X-Git-Tag: mutt-1-3-15-rel~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7db37f26733b8038e39fdf384eba33400ce9577f;p=mutt Avoid an infinite loop in the pager. From Edmund Grimley Evans. --- diff --git a/pager.c b/pager.c index 93bf767f..1930e40c 100644 --- a/pager.c +++ b/pager.c @@ -991,9 +991,7 @@ static int format_line (struct line_t **lineInfo, int n, unsigned char *buf, ch = grok_ansi (buf, ch+2, pa) + 1; k = mbrtowc (&wc, (char *)buf+ch, cnt-ch, &mbstate); - if (k == -2) - break; - if (k == -1) + if (k == -2 || k == -1) { if (col + 4 > COLS) break;