# wasm: \`UnwrapErrUnionPayloadPtr\` ensure ptr ret · gitcafe/zig

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

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

Visibility: public

Requested revision: ffa89d3b8370377b56be594650c0ea73f225c926

Requested commit: ffa89d3b8370377b56be594650c0ea73f225c926

Commit: ffa89d3b8370377b56be594650c0ea73f225c926

Tree: 611a23c6a865e1bb28b50c72b15e18d3e2b82aa1

Author: Luuk de Gram

Committer: Luuk de Gram

## Message

```
wasm: `UnwrapErrUnionPayloadPtr` ensure ptr ret

When the paylaod is zero-sized we must ensure a valid pointer
is still returned for the ptr variation of the instruction. This,
because it's valid to have a pointer to a zero-sized value.
In such a case, we simply return the operand.

```

## Parents

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

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