# Sema: fix memcpy alias safety incorrect math · gitcafe/zig

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

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

Visibility: public

Requested revision: 792bbfa301436fc0ce31bc4072b4765ba1408a55

Requested commit: 792bbfa301436fc0ce31bc4072b4765ba1408a55

Commit: 792bbfa301436fc0ce31bc4072b4765ba1408a55

Tree: 4e249d92a5ab600e4ba67893e10ce392b7e506cb

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
Sema: fix memcpy alias safety incorrect math

Previously it was not multiplying by the element ABI size. Now, it uses
ptr_add instructions which do math based on the element type.

```

## Parents

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

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