From f1db539ba31ef82627de9313e0f53b472c11fb85 Mon Sep 17 00:00:00 2001 From: lovyan03 <42724151+lovyan03@users.noreply.github.com> Date: Mon, 26 Feb 2024 14:31:54 +0900 Subject: [PATCH] Fix uninitialized members _pressed and _last_press in LGFX_Button for stable behavior --- src/lgfx/v1/LGFX_Button.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lgfx/v1/LGFX_Button.hpp b/src/lgfx/v1/LGFX_Button.hpp index 3decc6ba..371898f9 100644 --- a/src/lgfx/v1/LGFX_Button.hpp +++ b/src/lgfx/v1/LGFX_Button.hpp @@ -95,7 +95,7 @@ namespace lgfx static constexpr size_t label_length = 11; char _label[label_length + 1]; // Button text is 11 chars maximum unless long_name used float _textsize_x, _textsize_y; - bool _pressed, _last_press; // Button states + bool _pressed = false, _last_press = false; // Button states }; //----------------------------------------------------------------------------