mirror of
https://github.com/glfw/glfw.git
synced 2025-06-14 11:42:16 +00:00
Fix too long buffer for ImmGetCompositionStringW()
It return's byte size, not string length. So that multiplying by sizeof(WCHAR) isn't needed.
This commit is contained in:
parent
ffce1503cc
commit
169da05c53
@ -858,7 +858,7 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM l
|
||||
{
|
||||
// get preedit data
|
||||
int length = preeditTextLength / sizeof(WCHAR);
|
||||
LPWSTR buffer = (LPWSTR) _glfw_calloc(preeditTextLength, sizeof(WCHAR));
|
||||
LPWSTR buffer = (LPWSTR) _glfw_calloc(preeditTextLength, 1);
|
||||
LPSTR attributes = (LPSTR) _glfw_calloc(attrLength, 1);
|
||||
DWORD *clauses = (DWORD*) _glfw_calloc(clauseLength, 1);
|
||||
ImmGetCompositionStringW(hIMC, GCS_COMPSTR, buffer, preeditTextLength);
|
||||
|
Loading…
Reference in New Issue
Block a user