Fix fgetc returning negative values

This commit is contained in:
K. Lange 2018-05-14 22:31:13 +09:00
parent a09f6326d0
commit 5a4cfde32d
1 changed files with 1 additions and 1 deletions

View File

@ -288,7 +288,7 @@ int fgetc(FILE * stream) {
stream->eof = 1;
return EOF;
}
return buf[0];
return (unsigned char)buf[0];
}
char *fgets(char *s, int size, FILE *stream) {