Use an int to hold the result of fgetc (bug noted by David Kimdon).
authorMatt Kraai <kraai@debian.org>
Tue, 11 Dec 2001 16:06:02 +0000 (16:06 -0000)
committerMatt Kraai <kraai@debian.org>
Tue, 11 Dec 2001 16:06:02 +0000 (16:06 -0000)
coreutils/wc.c

index 9f818ea72deec9fe430a2181c661047ac5d0a8ae..fb81c0a8f7d7c21f53c0a841435c3ddbc8d02e6a 100644 (file)
@@ -68,7 +68,7 @@ static void wc_file(FILE * file, const char *name)
        unsigned int length = 0;
        unsigned int linepos = 0;
        char in_word = 0;
-       char c;
+       int c;
 
        while ((c = getc(file)) != EOF) {
                chars++;