From: David Lawrence Ramsey Date: Thu, 24 Mar 2005 22:28:25 +0000 (+0000) Subject: add missing blank lines X-Git-Tag: v1.3.7~39 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=cb4f14b8ce06a269fde8163b595c8646888c47ef;p=nano.git add missing blank lines git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2423 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- diff --git a/src/winio.c b/src/winio.c index 9fd11880..69dcaa00 100644 --- a/src/winio.c +++ b/src/winio.c @@ -2765,6 +2765,7 @@ void titlebar(const char *path) statelen++; assert(space >= 0); + if (space == 0 || statelen >= space) goto the_end; @@ -2778,7 +2779,9 @@ void titlebar(const char *path) newfie = TRUE; } else prefix = _("File:"); + assert(statelen < space); + prefixlen = strnlenpt(prefix, space - statelen); /* If newfie is FALSE, we need a space after prefix. */ if (!newfie && prefixlen + statelen < space) @@ -2837,6 +2840,7 @@ void titlebar(const char *path) mvwaddnstr(topwin, 0, 0, state, COLS); else { assert(COLS - statelen - 2 >= 0); + mvwaddch(topwin, 0, COLS - statelen - 2, ' '); mvwaddnstr(topwin, 0, COLS - statelen - 1, state, statelen); }