From f171070f25e36e2684bc80fc309f488ffc51994f Mon Sep 17 00:00:00 2001 From: kraus Date: Fri, 7 Jan 2022 22:54:13 +0100 Subject: [PATCH] issue #1683 --- csrc/mui_u8g2.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/csrc/mui_u8g2.c b/csrc/mui_u8g2.c index 63a0fa38..a4fc2570 100644 --- a/csrc/mui_u8g2.c +++ b/csrc/mui_u8g2.c @@ -601,7 +601,8 @@ static void mui_u8g2_u8_vmm_draw_wm_pi(mui_t *ui) { u8g2_t *u8g2 = mui_get_U8g2(ui); mui_u8g2_u8_min_max_t *vmm= (mui_u8g2_u8_min_max_t *)muif_get_data(ui->uif); - char s[4] = "999"; + char buf[4] = "999"; + char *s = buf; uint8_t *value = mui_u8g2_u8mm_get_valptr(vmm); uint8_t min = mui_u8g2_u8mm_get_min(vmm); uint8_t max = mui_u8g2_u8mm_get_max(vmm); @@ -714,7 +715,8 @@ static void mui_u8g2_u8_vmm_draw_wm_pf(mui_t *ui) { u8g2_t *u8g2 = mui_get_U8g2(ui); mui_u8g2_u8_min_max_t *vmm= (mui_u8g2_u8_min_max_t *)muif_get_data(ui->uif); - char s[4] = "999"; + char buf[4] = "999"; + char *s = buf; uint8_t *value = mui_u8g2_u8mm_get_valptr(vmm); uint8_t min = mui_u8g2_u8mm_get_min(vmm); uint8_t max = mui_u8g2_u8mm_get_max(vmm); @@ -828,7 +830,8 @@ static void mui_u8g2_u8_bar_draw_wm(mui_t *ui, uint8_t flags) { u8g2_t *u8g2 = mui_get_U8g2(ui); mui_u8g2_u8_min_max_step_t *vmms= (mui_u8g2_u8_min_max_step_t *)muif_get_data(ui->uif); - char s[4] = "999"; + char buf[4] = "999"; + char *s = buf; uint8_t *value = mui_u8g2_u8mms_get_valptr(vmms); uint8_t min = mui_u8g2_u8mms_get_min(vmms); uint8_t max = mui_u8g2_u8mms_get_max(vmms);