From 5b3efaa4cd0d387ea5f10685e16f0f926b1e8ba1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20M=C3=BCller?= Date: Fri, 16 Jun 2023 17:39:44 +0200 Subject: [PATCH] Fix uninitialized `CLineInput` member variables Closes #6745. --- src/game/client/lineinput.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/game/client/lineinput.cpp b/src/game/client/lineinput.cpp index ddf239291..9003d3c33 100644 --- a/src/game/client/lineinput.cpp +++ b/src/game/client/lineinput.cpp @@ -29,11 +29,12 @@ void CLineInput::SetBuffer(char *pStr, size_t MaxSize, size_t MaxChars) m_WasChanged = m_pStr && pLastStr && m_WasChanged; if(!pLastStr) { + m_CursorPos = m_SelectionStart = m_SelectionEnd = m_LastCompositionCursorPos = 0; m_ScrollOffset = m_ScrollOffsetChange = 0.0f; m_CaretPosition = vec2(0.0f, 0.0f); + m_MouseSelection.m_Selecting = false; m_Hidden = false; m_pEmptyText = nullptr; - m_MouseSelection.m_Selecting = false; m_WasRendered = false; } if(m_pStr && m_pStr != pLastStr)