From 522e975a4eaccd897dae6fa058b6795ea9fbb7c6 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Thu, 19 Nov 2020 11:49:00 +0100 Subject: [PATCH] fix(btnmatrix): fix seg. fault with arabic text processing --- src/lv_widgets/lv_btnmatrix.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lv_widgets/lv_btnmatrix.c b/src/lv_widgets/lv_btnmatrix.c index 00926957b..8829b7107 100644 --- a/src/lv_widgets/lv_btnmatrix.c +++ b/src/lv_widgets/lv_btnmatrix.c @@ -15,6 +15,7 @@ #include "../lv_core/lv_refr.h" #include "../lv_themes/lv_theme.h" #include "../lv_misc/lv_txt.h" +#include "../lv_misc/lv_txt_ap.h" /********************* * DEFINES @@ -804,7 +805,7 @@ static lv_design_res_t lv_btnmatrix_design(lv_obj_t * btnm, const lv_area_t * cl /*Get the size of the Arabic text and process it*/ size_t len_ap = _lv_txt_ap_calc_bytes_cnt(txt); if(len_ap < txt_ap_size) { - _lv_txt_ap_proc(txt_ap, txt); + _lv_txt_ap_proc(txt, txt_ap); txt = txt_ap; } #endif