X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fstdio%2Fsetvbuf.c;h=06ea296c6a64202ed4f95e23c6af884f5305e1e7;hb=21a172dd36cae7a08492fd3a7500d7bf0daee13e;hp=b6b9b018d6510b7a47975a2f6b7d5bb93c7a19d3;hpb=3f3cc3e99558501318e2f16ff03bbd68ce5a5e95;p=musl diff --git a/src/stdio/setvbuf.c b/src/stdio/setvbuf.c index b6b9b018..06ea296c 100644 --- a/src/stdio/setvbuf.c +++ b/src/stdio/setvbuf.c @@ -14,7 +14,7 @@ int setvbuf(FILE *restrict f, char *restrict buf, int type, size_t size) f->buf_size = 0; } else { if (buf && size >= UNGET) { - f->buf = (void *)buf; + f->buf = (void *)(buf + UNGET); f->buf_size = size - UNGET; } if (type == _IOLBF && f->buf_size)