Skip to content

Commit

Permalink
Fix up operator precedence in RGBLIGHT (#21280)
Browse files Browse the repository at this point in the history
  • Loading branch information
tzarc authored Jun 18, 2023
1 parent a2171ff commit 884be6c
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 884be6c

Please sign in to comment.