$NetBSD: patch-ah,v 1.2 2006/06/13 17:25:00 drochner Exp $

--- subreader.c.orig	2006-06-11 20:35:47.000000000 +0200
+++ subreader.c
@@ -74,10 +74,10 @@ static int eol(char p) {
 /* Remove leading and trailing space */
 static void trail_space(char *s) {
 	int i = 0;
-	while (isspace(s[i])) ++i;
+	while (isspace((unsigned char)s[i])) ++i;
 	if (i) strcpy(s, s + i);
 	i = strlen(s) - 1;
-	while (i > 0 && isspace(s[i])) s[i--] = '\0';
+	while (i > 0 && isspace((unsigned char)s[i])) s[i--] = '\0';
 }
 
 static char *stristr(const char *haystack, const char *needle) {
@@ -628,7 +628,7 @@ subtitle *sub_read_line_pjs(stream_t *st
     if (!stream_read_line (st, line, LINE_LEN))
 	return NULL;
     /* skip spaces */
-    for (s=line; *s && isspace(*s); s++);
+    for (s=line; *s && isspace(*(unsigned char*)s); s++);
     /* allow empty lines at the end of the file */
     if (*s==0)
 	return NULL;
@@ -681,7 +681,7 @@ subtitle *sub_read_line_mpsub(stream_t *
 			else return current;
 		}
 		p=line;
-		while (isspace(*p)) p++;
+		while (isspace(*(unsigned char*)p)) p++;
 		if (eol(*p) && num > 0) return current;
 		if (eol(*p)) return NULL;
 
