summaryrefslogtreecommitdiff
path: root/src/stdio
diff options
context:
space:
mode:
Diffstat (limited to 'src/stdio')
-rw-r--r--src/stdio/__toread.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/stdio/__toread.c b/src/stdio/__toread.c
index b08f5bb4..35f67b8f 100644
--- a/src/stdio/__toread.c
+++ b/src/stdio/__toread.c
@@ -3,7 +3,7 @@
int __toread(FILE *f)
{
f->mode |= f->mode-1;
- if (f->wpos > f->buf) f->write(f, 0, 0);
+ if (f->wpos > f->wbase) f->write(f, 0, 0);
f->wpos = f->wbase = f->wend = 0;
if (f->flags & F_NORD) {
f->flags |= F_ERR;