SettingDisplay: Reduce buffer size

Given that 2^16 / 1000 is 65, we can make the buffer only 3 chars.
This commit is contained in:
Mingjie Shen 2023-04-26 22:39:36 -04:00 committed by NeroBurner
parent c9fbcd8818
commit cd8216d1c9

View File

@ -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);