Commit 0c23aed6 authored by David Lawrence Ramsey's avatar David Lawrence Ramsey
Browse files

fix erroneous statusbar message truncation with multibyte strings

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2326 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
No related merge requests found
Showing with 2 additions and 2 deletions
+2 -2
......@@ -2849,8 +2849,8 @@ void statusbar(const char *msg, ...)
UNSET(WHITESPACE_DISPLAY);
#endif
bar = charalloc(COLS - 3);
vsnprintf(bar, COLS - 3, msg, ap);
bar = charalloc(mb_cur_max() * (COLS - 3));
vsnprintf(bar, mb_cur_max() * (COLS - 3), msg, ap);
va_end(ap);
foo = display_string(bar, 0, COLS - 4, FALSE);
#if !defined(NANO_SMALL) && defined(ENABLE_NANORC)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment