Skip to content

Commit

Permalink
rgblight: Limit max repeat times in rgblight_blink_layer_repeat (#16860)
Browse files Browse the repository at this point in the history
  • Loading branch information
nomis authored Apr 16, 2022
1 parent b331c98 commit 1cfe497
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions quantum/rgblight/rgblight.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 1cfe497

Please sign in to comment.