Fix fgetc returning negative values
This commit is contained in:
parent
a09f6326d0
commit
5a4cfde32d
|
@ -288,7 +288,7 @@ int fgetc(FILE * stream) {
|
||||||
stream->eof = 1;
|
stream->eof = 1;
|
||||||
return EOF;
|
return EOF;
|
||||||
}
|
}
|
||||||
return buf[0];
|
return (unsigned char)buf[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
char *fgets(char *s, int size, FILE *stream) {
|
char *fgets(char *s, int size, FILE *stream) {
|
||||||
|
|
Loading…
Reference in New Issue