From 4a95d1467ffb110797963e3808347162adaac24c Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 27 Sep 2023 09:14:48 +0200 Subject: [PATCH] fix(roller): fix warning with MSVC fixes #4601 --- src/widgets/roller/lv_roller.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/roller/lv_roller.c b/src/widgets/roller/lv_roller.c index dc46bc2c6..bad72ad10 100644 --- a/src/widgets/roller/lv_roller.c +++ b/src/widgets/roller/lv_roller.c @@ -181,7 +181,7 @@ void lv_roller_set_selected(lv_obj_t * obj, uint32_t sel_opt, lv_anim_enable_t a uint32_t act_opt = roller->sel_opt_id - current_page * real_option_cnt; int32_t sel_opt_signed = sel_opt; /*Huge jump? Probably from last to first or first to last option.*/ - if((uint32_t)LV_ABS((int16_t)act_opt - sel_opt) > real_option_cnt / 2) { + if((uint32_t)LV_ABS((int16_t)(act_opt - sel_opt)) > real_option_cnt / 2) { if(act_opt > sel_opt) sel_opt_signed += real_option_cnt; else sel_opt_signed -= real_option_cnt; }