diff options
-rw-r--r-- | src/stdio/__uflow.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/stdio/__uflow.c b/src/stdio/__uflow.c index 544dda98..e28922c2 100644 --- a/src/stdio/__uflow.c +++ b/src/stdio/__uflow.c @@ -5,7 +5,7 @@ int __uflow(FILE *f) { - unsigned char c = EOF; - if (f->rend || !__toread(f)) f->read(f, &c, 1); - return c; + unsigned char c; + if ((f->rend || !__toread(f)) && f->read(f, &c, 1)==1) return c; + return EOF; } |