From 528677c637f32247fb136e390834ba30db5739ef Mon Sep 17 00:00:00 2001 From: xezon <4720891+xezon@users.noreply.github.com> Date: Mon, 9 Sep 2024 14:37:31 +0200 Subject: [PATCH] Fix array count in IMEManager::Update_Candidate_List --- src/game/client/gui/imemanager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game/client/gui/imemanager.cpp b/src/game/client/gui/imemanager.cpp index 946f71103..3e1de3a56 100644 --- a/src/game/client/gui/imemanager.cpp +++ b/src/game/client/gui/imemanager.cpp @@ -563,7 +563,7 @@ void IMEManager::Update_Candidate_List(int candidate_flags) DWORD size = ImmGetCandidateListCountW(m_context, &count); if (size > 0 || (is_unicode = false, size = ImmGetCandidateListCountA(m_context, &count), size > 0)) { - CANDIDATELIST *list = new CANDIDATELIST[size]; + CANDIDATELIST *list = new CANDIDATELIST[count]; if (list != nullptr) { memset(list, 0, size);