summaryrefslogtreecommitdiff
path: root/quantum
diff options
context:
space:
mode:
authorChristopher Berner <christopherberner@gmail.com>2023-04-29 18:56:58 -0700
committerGitHub <noreply@github.com>2023-04-30 11:56:58 +1000
commit7138fa4582118a477fed293a647af52c0ad13919 (patch)
tree29eb18a915d9f4afa09d4b839f507061e9826089 /quantum
parentccb37b155cc8efcb286465dd141490a30f8ac6b5 (diff)
Fix MATRIX_HAS_GHOST when MATRIX_COL > 16 (#20093)
Diffstat (limited to 'quantum')
-rw-r--r--quantum/keyboard.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/quantum/keyboard.c b/quantum/keyboard.c
index ec2f2e4496..b63f0abfac 100644
--- a/quantum/keyboard.c
+++ b/quantum/keyboard.c
@@ -171,9 +171,9 @@ static matrix_row_t get_real_keys(uint8_t row, matrix_row_t rowdata) {
matrix_row_t out = 0;
for (uint8_t col = 0; col < MATRIX_COLS; col++) {
// read each key in the row data and check if the keymap defines it as a real key
- if (keycode_at_keymap_location(0, row, col) && (rowdata & (1 << col))) {
+ if (keycode_at_keymap_location(0, row, col) && (rowdata & (((matrix_row_t)1) << col))) {
// this creates new row data, if a key is defined in the keymap, it will be set here
- out |= 1 << col;
+ out |= ((matrix_row_t)1) << col;
}
}
return out;