diff --git a/src/modules/Image/encodings/pnm.c b/src/modules/Image/encodings/pnm.c
index de8863fb14de45446c4cb62b650c2c86d7d98668..6a06b1ff88614839329f3450fd2e53b51ef76324 100644
--- a/src/modules/Image/encodings/pnm.c
+++ b/src/modules/Image/encodings/pnm.c
@@ -1,9 +1,9 @@
-/* $Id: pnm.c,v 1.7 1998/03/03 23:30:17 hubbe Exp $ */
+/* $Id: pnm.c,v 1.8 1998/06/22 16:41:38 grubba Exp $ */
 
 /*
 **! module Image
 **! note
-**!	$Id: pnm.c,v 1.7 1998/03/03 23:30:17 hubbe Exp $
+**!	$Id: pnm.c,v 1.8 1998/06/22 16:41:38 grubba Exp $
 **! submodule PNM
 **!
 **!	This submodule keeps the PNM encode/decode capabilities
@@ -49,7 +49,7 @@
 
 #include "stralloc.h"
 #include "global.h"
-RCSID("$Id: pnm.c,v 1.7 1998/03/03 23:30:17 hubbe Exp $");
+RCSID("$Id: pnm.c,v 1.8 1998/06/22 16:41:38 grubba Exp $");
 #include "pike_macros.h"
 #include "object.h"
 #include "constants.h"
@@ -73,7 +73,7 @@ static INLINE unsigned char getnext(struct pike_string *s,INT32 *pos)
 {
    if (*pos>=s->len) return 0;
    if (s->str[(*pos)]=='#')
-      for (;*pos<s->len && ISSPACE(s->str[*pos]);(*pos)++);
+      for (;*pos<s->len && ISSPACE(((unsigned char *)s->str)[*pos]);(*pos)++);
    return s->str[(*pos)++];
 }
 
@@ -93,7 +93,7 @@ static INLINE unsigned char getnext_skip_comment(struct pike_string *s,INT32 *po
 static INLINE void skipwhite(struct pike_string *s,INT32 *pos)
 {
    while (*pos<s->len && 
-	  ( ISSPACE(s->str[*pos]) ||
+	  ( ISSPACE(((unsigned char *)s->str)[*pos]) ||
 	    s->str[*pos]=='#'))
       getnext_skip_comment(s,pos);
 }