Browse code

Handle wide characters on windows

git-svn: trunk@2849

Nigel Horne authored on 2007/02/24 02:33:47
Showing 2 changed files
... ...
@@ -1,3 +1,7 @@
1
+Fri Feb 23 15:37:40 GMT 2007 (njh)
2
+----------------------------------
3
+  * libclamav/mbox.c:	Handle wide characters on Windows
4
+
1 5
 Thu Feb 22 18:40:20 GMT 2007 (njh)
2 6
 ----------------------------------
3 7
   * libclamav/tnef.c:	Remove warning messages
... ...
@@ -1594,7 +1594,11 @@ parseEmailFile(FILE *fin, const table_t *rfc821, const char *firstLine, const ch
1594 1594
 		if(inHeader) {
1595 1595
 			cli_dbgmsg("parseEmailFile: check '%s' fullline %p\n",
1596 1596
 				buffer ? buffer : "", fullline);
1597
-			if(line && isspace(line[0])) {
1597
+			/*
1598
+			 * Ensure wide characters are handled where
1599
+			 * sizeof(char) > 1
1600
+			 */
1601
+			if(line && isspace(line[0] & 0xFF)) {
1598 1602
 				char copy[sizeof(buffer)];
1599 1603
 
1600 1604
 				strcpy(copy, buffer);