# fix segfault when passing union enum with sub byte\.\.\. · gitcafe/zig

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

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

Visibility: public

Requested revision: 2a25398c869fcdefe8b6508974a5c463ca833520

Requested commit: 2a25398c869fcdefe8b6508974a5c463ca833520

Commit: 2a25398c869fcdefe8b6508974a5c463ca833520

Tree: cab802b768a4b2559a234c2a29c301435678bac3

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
fix segfault when passing union enum with sub byte...

...field to const slice parameter

we use a packed struct internally to represent a const array
of disparate union values, and needed to update the internal
getelementptr instruction to recognize that.

closes #664

```

## Parents

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

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