mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-14 06:42:58 +08:00
fix(color) fix off-by-one error
This commit is contained in:
parent
f4988689a8
commit
d9b3c672fd
@ -358,8 +358,8 @@ lv_color_t lv_palette_darken(lv_palette_t p, uint8_t lvl)
|
||||
return lv_color_black();
|
||||
}
|
||||
|
||||
if(lvl == 0 || lvl > 5) {
|
||||
LV_LOG_WARN("Invalid level: %d. Must be 1..5", lvl);
|
||||
if(lvl == 0 || lvl > 4) {
|
||||
LV_LOG_WARN("Invalid level: %d. Must be 1..4", lvl);
|
||||
return lv_color_black();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user