Skip to content

Commit f828802

Browse files
authored
fix(event.cpp): initialize Term::Button::Type type to prevent uninitialized variable exception (#387)
1 parent 0242e24 commit f828802

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cpp-terminal/event.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ void Term::Event::parse(const std::string& str)
260260
if(str[str.size() - 1] == 'm') action = Term::Button::Action::Released;
261261
else
262262
action = Term::Button::Action::Pressed;
263-
Term::Button::Type type;
263+
Term::Button::Type type = Button::Type::None;
264264
switch(values[0])
265265
{
266266
case 0:

0 commit comments

Comments
 (0)