diff options
Diffstat (limited to 'src/internal/shgetc.c')
-rw-r--r-- | src/internal/shgetc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/internal/shgetc.c b/src/internal/shgetc.c index ebd5fae7..a4a9c633 100644 --- a/src/internal/shgetc.c +++ b/src/internal/shgetc.c @@ -22,7 +22,8 @@ int __shgetc(FILE *f) off_t cnt = shcnt(f); if (f->shlim && cnt >= f->shlim || (c=__uflow(f)) < 0) { f->shcnt = f->buf - f->rpos + cnt; - f->shend = 0; + f->shend = f->rpos; + f->shlim = -1; return EOF; } cnt++; |