Skip to content

Conversation

@ghost
Copy link

@ghost ghost commented Apr 22, 2019

This is unexpected in C as 'if(2)' will eval the true path.

Cause: The is_true constraint does a intptr_t compare with 1. However every non-zero value should be considered true.
Fix: Inverted logic in the constraint, instead of compare_want_value with true (1), used compare_do_not_want_value with false (0).

… as 'if(2)' will eval the true path.

Cause:  The is_true constraint does a intptr_t compare with 1. However every non-zero value should be considered true.
Fix:    Inverted logic in the constraint, instead of compare_want_value with true (1), used compare_do_not_want_value with false (0).
@coveralls
Copy link

Coverage Status

Coverage increased (+0.005%) to 96.361% when pulling acd5a6e on OscarStarink:bool_fix into 5c078a6 on cgreen-devs:master.

@thoni56 thoni56 merged commit d4daff8 into cgreen-devs:master Apr 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants