aboutsummaryrefslogtreecommitdiff
path: root/contrib/string/string_io.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/string/string_io.c')
-rw-r--r--contrib/string/string_io.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/contrib/string/string_io.c b/contrib/string/string_io.c
index c329fec1e9e..8c4e5b45e1a 100644
--- a/contrib/string/string_io.c
+++ b/contrib/string/string_io.c
@@ -28,9 +28,10 @@
#define DIGIT(val) ((val) + '0')
#define ISOCTAL(c) (((c) >= '0') && ((c) <= '7'))
#ifndef ISO8859
-#define NOTPRINTABLE(c) (!isprint(c))
+#define NOTPRINTABLE(c) (!isprint((unsigned char) (c)))
#else
-#define NOTPRINTABLE(c) (!isprint(c) && ((c) < 0xa0))
+#define NOTPRINTABLE(c) (!isprint((unsigned char) (c)) && \
+ ((unsigned char) (c) < (unsigned char) 0xa0))
#endif
/*