Skip to content

Commit

Permalink
Prevent strong mods ref counter from underflowing
Browse files Browse the repository at this point in the history
  • Loading branch information
semickolon committed Jan 4, 2024
1 parent 8a3576d commit 2d3fb8e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/split_central.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ static void register_mods(uint8_t mods, uint8_t down) {
if (mods & (1 << i)) {
if (down) {
strong_mods_ref_count[i] += 1;
} else {
} else if (strong_mods_ref_count[i] > 0) {
strong_mods_ref_count[i] -= 1;
}
}
Expand Down

0 comments on commit 2d3fb8e

Please sign in to comment.