Browse code

Fixed multi-byte char bug under Windows

git-svn: trunk@3036

Nigel Horne authored on 2007/04/23 00:20:31
Showing 2 changed files
... ...
@@ -1,3 +1,7 @@
1
+Sun Apr 22 15:29:23 BST 2007 (njh)
2
+----------------------------------
3
+  * libclamav/mbox.c:	Fixed multi-byte char bug under Windows
4
+
1 5
 Sat Apr 21 23:08:10 BST 2007 (njh)
2 6
 ----------------------------------
3 7
   * libclamav/blob.[ch]:	blobGetFilename is now static()
... ...
@@ -3219,7 +3219,7 @@ strip(char *buf, int len)
3219 3219
 		if(*ptr)	/* C8.0 puts into a text area */
3220 3220
 #endif
3221 3221
 			*ptr = '\0';
3222
-	while((--len >= 0) && ((*--ptr == '\0') || (isspace((int)*ptr))));
3222
+	while((--len >= 0) && ((*--ptr == '\0') || isspace((int)(*ptr & 0xFF))));
3223 3223
 #endif
3224 3224
 	return((size_t)(len + 1));
3225 3225
 }