aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tmk_core/common/action_layer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tmk_core/common/action_layer.c b/tmk_core/common/action_layer.c
index 46ea58727..9dfbba9da 100644
--- a/tmk_core/common/action_layer.c
+++ b/tmk_core/common/action_layer.c
@@ -94,8 +94,8 @@ bool layer_state_is(uint8_t layer)
94} 94}
95 95
96bool layer_state_cmp(uint32_t cmp_layer_state, uint8_t layer) { 96bool layer_state_cmp(uint32_t cmp_layer_state, uint8_t layer) {
97 if (layer == 0) { return cmp_layer_state == 0; } 97 if (!cmp_layer_state) { return layer == 0; }
98 return (cmp_layer_state & (1UL<<layer)) > 0; 98 return (cmp_layer_state & (1UL<<layer)) != 0;
99} 99}
100 100
101void layer_move(uint8_t layer) 101void layer_move(uint8_t layer)