From 3aec9a4354440f36adbfb8e1a1feb9942724b74c Mon Sep 17 00:00:00 2001 From: "Colin T.A. Gray" Date: Mon, 11 Dec 2017 08:53:50 -0700 Subject: [PATCH] fixes 'layer_state_cmp' when layer is '1' (aka layer 0, aka layer 1<<0) --- tmk_core/common/action_layer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tmk_core/common/action_layer.c b/tmk_core/common/action_layer.c index 46ea5872..9dfbba9d 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) } bool layer_state_cmp(uint32_t cmp_layer_state, uint8_t layer) { - if (layer == 0) { return cmp_layer_state == 0; } - return (cmp_layer_state & (1UL< 0; + if (!cmp_layer_state) { return layer == 0; } + return (cmp_layer_state & (1UL<