nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit eb4d81f3c1acab46a80c4f8e325b5d4f5b19d47f
parent aed09427f8f60cc56f0e269b38ca259d82914d42
Author: David Lawrence Ramsey <pooka109@gmail.com>
Date:   Tue,  1 Mar 2005 22:47:00 +0000

cosmetic fixes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2331 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

Diffstat:
Msrc/winio.c | 8+++++---
1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/winio.c b/src/winio.c @@ -3801,11 +3801,13 @@ int help_line_len(const char *ptr) ptr--; j--; } - /* Word longer than COLS - 5 chars just gets broken. */ + /* A word longer than (COLS - 5) chars just gets broken. */ if (j == 0) j = COLS - 5; } + assert(j >= 0 && j <= COLS - 4 && (j > 0 || *ptr == '\n')); + return j; } @@ -3813,8 +3815,8 @@ int help_line_len(const char *ptr) void do_help(void) { int line = 0; - /* The line number in help_text of the first displayed help line. - * This variable is zero-based. */ + /* The line number in help_text of the first displayed help + * line. This variable is zero-based. */ bool no_more = FALSE; /* no_more means the end of the help text is shown, so don't go * down any more. */