Use an int to hold the result of fgetc (bug noted by David Kimdon).

This commit is contained in:
Matt Kraai 2001-12-11 16:06:02 +00:00
parent 72812d3143
commit 741f40b58e

View 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++;