Fix up operator precedence in RGBLIGHT (#21280)

This commit is contained in:
Nick Brassel 2023-06-18 14:33:18 +10:00 committed by GitHub
parent a2171ff4e8
commit 884be6c1ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1277,7 +1277,7 @@ void rgblight_effect_snake(animation_status_t *anim) {
for (j = 0; j < RGBLIGHT_EFFECT_SNAKE_LENGTH; j++) { for (j = 0; j < RGBLIGHT_EFFECT_SNAKE_LENGTH; j++) {
k = pos + j * increment; k = pos + j * increment;
if (k > RGBLED_NUM) { if (k > RGBLED_NUM) {
k = k % RGBLED_NUM; k = k % (RGBLED_NUM);
} }
if (k < 0) { if (k < 0) {
k = k + rgblight_ranges.effect_num_leds; k = k + rgblight_ranges.effect_num_leds;