X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=menu.c;h=f892f2710f2b9d888c201ff207a7a888590242a2;hp=35a49879fd7b67a19dd89f97a93b5f2eb09697b5;hb=fedbb0047287e63c53cc911b668ae6212f59b846;hpb=21b5df0ced4381fd3f48ce40d096631edf12ec68 diff --git a/menu.c b/menu.c index 35a4987..f892f27 100644 --- a/menu.c +++ b/menu.c @@ -157,8 +157,12 @@ void menu_pad_string (char *s, size_t n) int shift = option (OPTARROWCURSOR) ? 3 : 0; int cols = COLS - shift - SidebarWidth; - mutt_format_string (s, n, cols, cols, 0, ' ', s, strlen (s), 1); - s[n - 1] = 0; + char tmpbuf[n]; + + mutt_format_string (tmpbuf, n, cols, cols, 0, ' ', s, strlen (s), 1); + tmpbuf[n - 1] = 0; + + snprintf(s,n,"%s",tmpbuf); /* overkill */ } void menu_redraw_full (MUTTMENU *menu)