From 07c63e36f75786683d05b651c0c9e12575da5c8c Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Sun, 18 Jun 2023 14:33:18 +1000 Subject: [PATCH] Fix up operator precedence in RGBLIGHT (#21280) --- quantum/rgblight/rgblight.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quantum/rgblight/rgblight.c b/quantum/rgblight/rgblight.c index ea28801a40ad..158112f31dad 100644 --- a/quantum/rgblight/rgblight.c +++ b/quantum/rgblight/rgblight.c @@ -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;