Skip to content

Commit

Permalink
Fix up operator precedence in RGBLIGHT (qmk#21280)
Browse files Browse the repository at this point in the history
  • Loading branch information
tzarc authored and coquizen committed Jun 22, 2023
1 parent 4d2b04f commit 07c63e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion quantum/rgblight/rgblight.c
Original file line number Diff line number Diff line change
Expand Up @@ -1277,7 +1277,7 @@ void rgblight_effect_snake(animation_status_t *anim) {
for (j = 0; j < RGBLIGHT_EFFECT_SNAKE_LENGTH; j++) {
k = pos + j * increment;
if (k > RGBLED_NUM) {
k = k % RGBLED_NUM;
k = k % (RGBLED_NUM);
}
if (k < 0) {
k = k + rgblight_ranges.effect_num_leds;
Expand Down

0 comments on commit 07c63e3

Please sign in to comment.