# std.zig.readSourceFileToEndAlloc: avoid resizing · gitcafe/zig

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

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

Visibility: public

Requested revision: 155ab56cc63d775cca77d7bedbcac6ee65558818

Requested commit: 155ab56cc63d775cca77d7bedbcac6ee65558818

Commit: 155ab56cc63d775cca77d7bedbcac6ee65558818

Tree: f00931ca6eb57e94e35662ad25f062094dfd6a81

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
std.zig.readSourceFileToEndAlloc: avoid resizing

+1 on the ensure total capacity to account for the fact that we add a
null byte before returning.

thanks matklad

```

## Parents

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

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