summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortmk <nobody@nowhere>2013-02-25 17:00:35 +0900
committertmk <nobody@nowhere>2013-02-25 17:00:35 +0900
commit1720cf34caa518a2cf85f286d1ca077ebe1a1451 (patch)
tree2e0df158b0aa2055d60553bfbc9d9497e0fb7772
parent7a31451a077a55e1ad97cf8b31a111c7cd311a4d (diff)
Fix bit shift which is beyond int size(16bit)
-rw-r--r--common/keyboard.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/keyboard.c b/common/keyboard.c
index e4bc3dc8c2..432ea89347 100644
--- a/common/keyboard.c
+++ b/common/keyboard.c
@@ -86,7 +86,7 @@ void keyboard_task(void)
if (matrix_change & ((matrix_row_t)1<<c)) {
action_exec((keyevent_t){
.key = (key_t){ .row = r, .col = c },
- .pressed = (matrix_row & (1<<c)),
+ .pressed = (matrix_row & ((matrix_row_t)1<<c)),
.time = (timer_read() | 1) /* time should not be 0 */
});
// record a processed key