front_input.c(1447,14): warning : use of bitwise '&' with boolean operands [-Wbitwise-instead-of-logical]
Closed this issue · 1 comments
Linvail commented
E:\Projects\keeperfx_2\src\front_input.c(1447,14): warning : use of bitwise '&' with boolean operands [-Wbitwise-instead-of-logical]
1447 | ( (is_key_pressed(KC_0,KMod_DONTCARE) || (is_key_pressed(KC_NUMPAD0,KMod_DONTCARE))) & (creature_instance_get_available_id_for_pos(thing,9) > 0) ) )
| ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| &&
Caught by clang-cl.
Do we really want to use "&" there?
PieterVdc commented
I suppose technically it would do the job, but yeah && makes more sense