# translate-c: ensure bools are cast to int when necessary · gitcafe/zig

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

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

Visibility: public

Requested revision: 1702b413f74d80fedd8803d60a69461b1e0b5b51

Requested commit: 1702b413f74d80fedd8803d60a69461b1e0b5b51

Commit: 1702b413f74d80fedd8803d60a69461b1e0b5b51

Tree: 58234c8778ae7cf26c9eedbf23078ff52485f4ef

Author: Evan Haas

Committer: Andrew Kelley

## Message

```
translate-c: ensure bools are cast to int when necessary

Fixes two scenarios where @boolToInt() calls were missing:

1. Boolean expression cast to different-size int (char, long, etc)
2. Boolean expression used as parameter for function with int argument

```

## Parents

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

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