# Io.Reader fix defaultReadVec · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/3ea015db968644c3f4e88fff59b9741b4903d478)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 3ea015db968644c3f4e88fff59b9741b4903d478

Requested commit: 3ea015db968644c3f4e88fff59b9741b4903d478

Commit: 3ea015db968644c3f4e88fff59b9741b4903d478

Tree: 4afe864313c3eb2f7b30395897238d773d33f8fe

Author: Igor Anić

Committer: Andrew Kelley

## Message

```
Io.Reader fix defaultReadVec

Running tar.pipeToFileSystem compressed_mingw_includes.tar file from #24732
finishes in infinite loop calling defaultReadVec with:
r.seek = 1024
r.end = 1024
r.buffer.len = 1024
first.len = 512
that combination calls vtable.stream with 0 capacity writer and loops
forever.

Comment is to use whichever has larger capacity, and this fix reflects that.

```

## Parents

- [23fff3442de38877c556f3cda19f3cccef255f7a](https://git.cafe/gitcafe/zig/commit/23fff3442de38877c556f3cda19f3cccef255f7a?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/3ea015db968644c3f4e88fff59b9741b4903d478?format=markdown)
