# fixed \#2356 · gitcafe/zig

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

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

Visibility: public

Requested revision: 1a2e02e267216bb35937d25598c773255d830b25

Requested commit: 1a2e02e267216bb35937d25598c773255d830b25

Commit: 1a2e02e267216bb35937d25598c773255d830b25

Tree: e48d37cb4f083692dffb89b57ec75795d374991b

Author: Jimmi HC

Committer: Jimmi HC

## Message

```
fixed #2356

const_ptr_pointee_unchecked did not take into account that if the
pointer is zero sized, then const_val->data.x_ptr.special would be
ConstPtrSpecialInvalid. This commit fixes this by also checking
that the child type of the pointer only have one possible value
and just returns that value.

```

## Parents

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

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