X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=muttlib.c;h=4beb99c86049c096c3e0d89b7f2b5397d1bc4243;hp=6e95088c64c9597a37c9e15e888c4ab12261db53;hb=2709e0121568c93bd012a57dedb15456271ef025;hpb=f404a0ca916be07049af51a3022baaaaab94def6 diff --git a/muttlib.c b/muttlib.c index 6e95088..4beb99c 100644 --- a/muttlib.c +++ b/muttlib.c @@ -1029,7 +1029,7 @@ void mutt_FormatString (char *dest, /* output buffer */ if ( DrawFullLine ) count = (COLS < destlen ? COLS : destlen); else - count = ((COLS-SidebarWidth) < destlen ? COLS - SidebarWidth : destlen); + count = ((COLS-SidebarWidth) < destlen ? (COLS - SidebarWidth) : destlen); if (count > col) { count -= col; /* how many columns left on this line */ @@ -1042,8 +1042,10 @@ void mutt_FormatString (char *dest, /* output buffer */ wptr += count; col += count; } - if (len + wlen > destlen) + if (wid + wlen > destlen) len = destlen - wlen; + else + len = wid; memcpy (wptr, buf, len); wptr += len; wlen += len; @@ -1469,7 +1471,7 @@ time_t mutt_decrease_mtime (const char *f, struct stat *st) const char *mutt_make_version (void) { static char vstring[STRING]; - snprintf (vstring, sizeof (vstring), "Mutt %s (%s)", + snprintf (vstring, sizeof (vstring), "Mutt-ng %s (%s)", MUTT_VERSION, ReleaseDate); return vstring; }