From: Ben Pfaff <blp@gnu.org>
Date: Sun, 31 Jul 2005 05:57:09 +0000 (+0000)
Subject: (postopen) Cast `char' to `unsigned char' before passing to isspace().
X-Git-Tag: v0.4.0~13
X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3dc1b25c7117a9f963a95d67397f5582b92356a2;p=pspp-builds.git

(postopen) Cast `char' to `unsigned char' before passing to isspace().
---

diff --git a/src/ChangeLog b/src/ChangeLog
index 7cee2d7b..3970abe1 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+Sat Jul 30 22:56:12 2005  Ben Pfaff  <blp@gnu.org>
+
+	* postscript.c: (postopen) Cast `char' to `unsigned char' before
+	passing to isspace().
+
 Sat Jul 30 22:52:09 2005  Ben Pfaff  <blp@gnu.org>
 
 	* pfm-read.c: (read_variables) Fix msg() bug found by -Wformat.
diff --git a/src/postscript.c b/src/postscript.c
index c828a0df..c5bde5e6 100644
--- a/src/postscript.c
+++ b/src/postscript.c
@@ -1452,7 +1452,7 @@ postopen (struct file_ext *f)
 	  char *beg;
 	  beg = buf2 = fn_interp_vars (buf, ps_get_var);
 	  len = strlen (buf2);
-	  while (isspace (*beg))
+	  while (isspace ((unsigned char) *beg))
 	    beg++, len--;
 	  if (beg[len - 1] == '\n')
 	    len--;