# Avoid index out of bounds for one-valued types in zirValidateArrayInit · gitcafe/zig

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

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

Visibility: public

Requested revision: d7d2ccb7af7349617fa76eef3bdead7c259654a5

Requested commit: d7d2ccb7af7349617fa76eef3bdead7c259654a5

Commit: d7d2ccb7af7349617fa76eef3bdead7c259654a5

Tree: d5585a7215f338a5c22cbbbbe4199a0b1ea58543

Author: John Schmidt

Committer: Andrew Kelley

## Message

```
Avoid index out of bounds for one-valued types in zirValidateArrayInit

Previously, the code assumed that `ptr_elem_ptr` was always followed by
a `store`, but this is not true for types with one value (such as `u0`).

```

## Parents

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

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