summaryrefslogtreecommitdiff
path: root/quantum
diff options
context:
space:
mode:
authortheVDude <rb.cubed@gmail.com>2019-10-15 18:13:13 -0400
committerFlorian Didron <fdidron@users.noreply.github.com>2019-11-04 17:22:09 +0900
commit14e5aab4c73ffae2406fefd5ea202c9eca45f1d7 (patch)
tree3b09938175b9f749fec4cf825721b689e8909b00 /quantum
parentbea75bd84ea69603f165b3e45ab4871a8ff5a4b1 (diff)
Fix small hiccup in snake animation (#6858)
Diffstat (limited to 'quantum')
-rw-r--r--quantum/rgblight.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/quantum/rgblight.c b/quantum/rgblight.c
index a094863fe9..1c197827f2 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;
}