Skip to content

Commit

Permalink
Fix infinite recursion in lxxt encoder logic (#21819)
Browse files Browse the repository at this point in the history
  • Loading branch information
zvecr authored Aug 23, 2023
1 parent b1fbfaa commit 90d1b32
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions keyboards/lxxt/lxxt.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#if defined(ENCODER_ENABLE)

bool encoder_update_kb(uint8_t index, bool clockwise) {
if (!encoder_update_kb(index, clockwise)) {
if (!encoder_update_user(index, clockwise)) {
return false; /* Don't process further events if user function exists and returns false */
}
if (index == 0) { /* First encoder */
Expand All @@ -39,4 +39,4 @@ bool encoder_update_kb(uint8_t index, bool clockwise) {
return true;
}

#endif
#endif

0 comments on commit 90d1b32

Please sign in to comment.