summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQMK Bot <hello@qmk.fm>2022-04-16 17:41:18 +0000
committerQMK Bot <hello@qmk.fm>2022-04-16 17:41:18 +0000
commitae4d518352204d1d7bdf32427b569a03f35fb494 (patch)
tree3be13daccb965e429ff393918eb86613a1b0a753
parent14d084ae13d072104efcf8bcc3fbcda57440813d (diff)
parent1cfe49714f2f108c20ccee96d23e7e1005a2e68e (diff)
Merge remote-tracking branch 'origin/master' into develop
-rw-r--r--quantum/rgblight/rgblight.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/quantum/rgblight/rgblight.c b/quantum/rgblight/rgblight.c
index 8f933a6e51..f4ddb81e92 100644
--- a/quantum/rgblight/rgblight.c
+++ b/quantum/rgblight/rgblight.c
@@ -813,6 +813,10 @@ void rgblight_blink_layer(uint8_t layer, uint16_t duration_ms) {
}
void rgblight_blink_layer_repeat(uint8_t layer, uint16_t duration_ms, uint8_t times) {
+ if (times > UINT8_MAX / 2) {
+ times = UINT8_MAX / 2;
+ }
+
_times_remaining = times * 2;
_dur = duration_ms;