# std.ArrayList.ensureTotalCapacity: optimize and fix integer overflow · gitcafe/zig

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

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

Visibility: public

Requested revision: 8c9f468fddbba41e49c932e015d49725ca62338e

Requested commit: 8c9f468fddbba41e49c932e015d49725ca62338e

Commit: 8c9f468fddbba41e49c932e015d49725ca62338e

Tree: d35a1b9a53e3818d478e406713a449b01f42e93c

Author: alichraghi

Committer: Andrew Kelley

## Message

```
std.ArrayList.ensureTotalCapacity: optimize and fix integer overflow

Fixes #12099

```

## Parents

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

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