# std.system: fix slice bounds in preadMin\(\) · gitcafe/zig

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

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

Visibility: public

Requested revision: b196dd1d7958aee86095bd06190eee484a562488

Requested commit: b196dd1d7958aee86095bd06190eee484a562488

Commit: b196dd1d7958aee86095bd06190eee484a562488

Tree: 43265d5c3ef346f57a041c107b9529880d4cac53

Author: Isaac Freund

Committer: Andrew Kelley

## Message

```
std.system: fix slice bounds in preadMin()

If a partial read occurs past the halfway point, buf.len - i will be
less than i, which is illegal. The end bound is also entirely unecessary
in this case, so just remove it.

```

## Parents

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

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