X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Finternal%2Fshgetc.c;h=a4a9c633dc976033622003c3cc7e5068466076bd;hb=107d68ad1737929a3e815bd28514cb56e4bedd57;hp=ebd5fae707b4ad44abfaf21cff797d9bcd37e26e;hpb=d6c855caa88ddb1ab6e24e23a14b1e7baf4ba9c7;p=musl 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++;