From cd8216d1c9c15f4d1876ed31f5d79b594e031e6c Mon Sep 17 00:00:00 2001 From: Mingjie Shen Date: Wed, 26 Apr 2023 22:39:36 -0400 Subject: [PATCH] SettingDisplay: Reduce buffer size Given that 2^16 / 1000 is 65, we can make the buffer only 3 chars. --- src/displayapp/screens/settings/SettingDisplay.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/displayapp/screens/settings/SettingDisplay.cpp b/src/displayapp/screens/settings/SettingDisplay.cpp index 9abb4c74..bd533e67 100644 --- a/src/displayapp/screens/settings/SettingDisplay.cpp +++ b/src/displayapp/screens/settings/SettingDisplay.cpp @@ -43,7 +43,7 @@ SettingDisplay::SettingDisplay(Pinetime::Applications::DisplayApp* app, Pinetime lv_label_set_align(icon, LV_LABEL_ALIGN_CENTER); lv_obj_align(icon, title, LV_ALIGN_OUT_LEFT_MID, -10, 0); - char buffer[12]; + char buffer[4]; for (unsigned int i = 0; i < options.size(); i++) { cbOption[i] = lv_checkbox_create(container1, nullptr); snprintf(buffer, sizeof(buffer), "%2" PRIu16 "s", options[i] / 1000);