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 autoferrit committed Dec 6, 2023
1 parent c65fd57 commit a35b37a
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 a35b37a

Please sign in to comment.