# Return zero for NaN-to-int lossy casts · gitcafe/zig

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

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

Visibility: public

Requested revision: cc56577edfadd7685de7fb14c013c5e3a69c28ce

Requested commit: cc56577edfadd7685de7fb14c013c5e3a69c28ce

Commit: cc56577edfadd7685de7fb14c013c5e3a69c28ce

Tree: 4bef172448f765f0526324bdd23f6ff1fc98910b

Author: Michael Bradshaw

Committer: Veikka Tuominen

## Message

```
Return zero for NaN-to-int lossy casts

Fixes #15038.

The goal here is to guarantee lossyCast() is panic-free and always safe.
```

## Parents

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

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