X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=lib-ui%2Fmenu.c;h=01f0ab811818abed03ee8543fd879db6b7c2f408;hb=3ebcd58b39ed808d967c502b332efc868e468a3c;hp=19ab550e84ea66f0e393567e47df701542ca9812;hpb=0ab517261694b001d2eb17f06f167a4cdd2c7c07;p=apps%2Fmadmutt.git 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; }