From 5a3aefed8d7fa2d86ff3d292915b42a3444048d0 Mon Sep 17 00:00:00 2001 From: theVDude Date: Tue, 15 Oct 2019 18:13:13 -0400 Subject: [PATCH] Fix small hiccup in snake animation (#6858) --- quantum/rgblight.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/quantum/rgblight.c b/quantum/rgblight.c index a094863fe9b..1c197827f29 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c @@ -910,6 +910,9 @@ void rgblight_effect_snake(animation_status_t *anim) { ledp->b = 0; for (j = 0; j < RGBLIGHT_EFFECT_SNAKE_LENGTH; j++) { k = pos + j * increment; + if (k > RGBLED_NUM) { + k = k % RGBLED_NUM; + } if (k < 0) { k = k + effect_num_leds; }