diff --git a/ChangeLog b/ChangeLog
index 4b08fddd0ef01648112978b6474807b1e2d3f037..bd34509d17763a8e472b60552b7fec3590dfe3b4 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 05b515393b8a6b63a668c8ec67fdb9733f7826c6..7e3b3925ecc57d5437d6617cc6bfc37da14aba68 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--;