InfiniTime/src/displayapp/screens/settings/SettingChimes.h
Reinhold Gschweicher f47b04ffd0 Fix SettingChimes cbOption array size
There are 3 options, but the array-size is set to 2. This leads to
memory corruption in the initialization of the SettingChimes screen when
assigning the third option object pointer.

Found in https://github.com/InfiniTimeOrg/InfiniSim/issues/11
2022-03-08 23:12:34 +01:00

28 lines
613 B
C++

#pragma once
#include <cstdint>
#include <lvgl/lvgl.h>
#include "components/settings/Settings.h"
#include "displayapp/screens/Screen.h"
namespace Pinetime {
namespace Applications {
namespace Screens {
class SettingChimes : public Screen {
public:
SettingChimes(DisplayApp* app, Pinetime::Controllers::Settings& settingsController);
~SettingChimes() override;
void UpdateSelected(lv_obj_t* object, lv_event_t event);
private:
Controllers::Settings& settingsController;
uint8_t optionsTotal;
lv_obj_t* cbOption[3];
};
}
}
}