# fix inability to write to global in some cases · gitcafe/zig

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

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

Visibility: public

Requested revision: 1195994880b6a83e61807381df2721ac5256e876

Requested commit: 1195994880b6a83e61807381df2721ac5256e876

Commit: 1195994880b6a83e61807381df2721ac5256e876

Tree: 7ca30412d5c1ad7a3df15633ac3303b74b49eaf6

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
fix inability to write to global in some cases

before, when we initialized a variable by copying the
initialization value, it made the internal const value
references point to a duplicate value, resulting in
a phony duplicate global value being updated instead of
the real on. now the behavior is as expected.

thanks to hoppetosse for pointing out this bug on IRC.

```

## Parents

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

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