]> git.friedersdorff.com Git - max/tmk_keyboard.git/commitdiff
Fix bit shift which is beyond int size(16bit)
authortmk <nobody@nowhere>
Mon, 25 Feb 2013 08:00:35 +0000 (17:00 +0900)
committertmk <nobody@nowhere>
Mon, 25 Feb 2013 08:00:35 +0000 (17:00 +0900)
common/keyboard.c

index e4bc3dc8c26fadf01fff978c633c2dfe3c163743..432ea89347622bdbd7e93f09ce9ea947554a7bc5 100644 (file)
@@ -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