X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fstdio%2F__overflow.c;h=e65a594dd7bf190a5481fc707a8f902812fe0ca3;hb=4554f155dd23a65fcdfd39f1d5af8af55ba37694;hp=3bb37923abb847787878cf868d86bce570fb267e;hpb=e3cd6c5c265cd481db6e0c5b529855d99f0bda30;p=musl diff --git a/src/stdio/__overflow.c b/src/stdio/__overflow.c index 3bb37923..e65a594d 100644 --- a/src/stdio/__overflow.c +++ b/src/stdio/__overflow.c @@ -4,7 +4,7 @@ int __overflow(FILE *f, int _c) { unsigned char c = _c; if (!f->wend && __towrite(f)) return EOF; - if (f->wpos < f->wend && c != f->lbf) return *f->wpos++ = c; + if (f->wpos != f->wend && c != f->lbf) return *f->wpos++ = c; if (f->write(f, &c, 1)!=1) return EOF; return c; }