X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=muttlib.c;h=b7bba5794b7be53c808f87a03d75f6931ae4b428;hp=6e95088c64c9597a37c9e15e888c4ab12261db53;hb=b1dfcb5c755ef8c2be60369432bc91e434b72a1f;hpb=f404a0ca916be07049af51a3022baaaaab94def6 diff --git a/muttlib.c b/muttlib.c index 6e95088..b7bba57 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) < destlen ? (COLS) : 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; }