Skip to content

Commit

Permalink
make sure we always update the state. fix static analysis error
Browse files Browse the repository at this point in the history
  • Loading branch information
carlos-zamora committed Dec 16, 2019
1 parent ae3e8a4 commit e20291e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/terminal/parser/InputStateMachineEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,8 @@ bool InputStateMachineEngine::ActionCsiDispatch(const wchar_t wch,
DWORD dwEventFlags = 0;
dwModifierState = _GetSGRMouseModifierState(rgusParams, cParams);
fSuccess = _GetXYPosition(rgusParams, cParams, &row, &col);
fSuccess = fSuccess ? _UpdateSGRMouseButtonState(wch, rgusParams, &dwButtonState, &dwEventFlags) : false;
return fSuccess ? _WriteMouseEvent(col, row, dwButtonState, dwModifierState, dwEventFlags) : false;
fSuccess = _UpdateSGRMouseButtonState(wch, rgusParams, &dwButtonState, &dwEventFlags) && fSuccess;
return _WriteMouseEvent(col, row, dwButtonState, dwModifierState, dwEventFlags) && fSuccess;
}
default:
fSuccess = false;
Expand Down
2 changes: 1 addition & 1 deletion src/terminal/parser/ut_parser/InputEngineTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -989,7 +989,7 @@ void InputEngineTest::VerifySGRMouseData(const std::vector<std::tuple<SGR_PARAMS
SGR_PARAMS input;
MOUSE_EVENT_PARAMS expected;
INPUT_RECORD inputRec;
for (int i = 0; i < testData.size(); i++)
for (size_t i = 0; i < testData.size(); i++)
{
// construct test input
input = std::get<0>(testData[i]);
Expand Down

0 comments on commit e20291e

Please sign in to comment.