From: Pierre Habouzit Date: Mon, 14 May 2007 14:35:08 +0000 (+0200) Subject: stupid error. X-Git-Url: http://git.madism.org/?a=commitdiff_plain;h=d1cdb827a3b972dd01012333a171433544accc15;p=apps%2Fmadmutt.git stupid error. Signed-off-by: Pierre Habouzit --- diff --git a/lib-ui/menu.c b/lib-ui/menu.c index 19ab550..01f0ab8 100644 --- a/lib-ui/menu.c +++ b/lib-ui/menu.c @@ -117,7 +117,7 @@ static void print_enriched_string (int attr, unsigned char *s, int do_color) if (do_color) attrset (attr); } - else if ((k = mbrtowc (&wc, (char *) s, n, &mbstate)) > 0) { + else if ((k = mbrtowc (&wc, (char *) s, n, &mbstate)) != (size_t)-1) { addnstr ((char *) s, k); s += k, n -= k; }