From d127c71ab30750077ecad77524869454d91cca61 Mon Sep 17 00:00:00 2001 From: Chris Allegretta Date: Wed, 12 Feb 2003 23:20:45 +0000 Subject: [PATCH] - nano.c:do_wrap() - Fix isspace() call to operate on int git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1452 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- ChangeLog | 2 ++ nano.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 4b08fddd..bd34509d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -34,6 +34,8 @@ CVS code - Add regfree() to quote regex (David Benbennick). - Only copy previous indent if AUTOINDENT is set (David Benbennick). + do_wrap() + - Fix isspace() call to operate on int. help_init() - Fix crashing in do_help when COLS < 23 (David Benbennick). main() diff --git a/nano.c b/nano.c index 05b51539..7e3b3925 100644 --- a/nano.c +++ b/nano.c @@ -1530,7 +1530,7 @@ int do_wrap(filestruct *inptr) * between after_break and wrap_line. If the line already ends * in a tab or a space, we don't add a space and decrement * totsize to account for that. */ - if (!isspace(newline[strlen(newline) - 1])) + if (!isspace((int) newline[strlen(newline) - 1])) strcat(newline, " "); else totsize--;