From 8a4fe8e6e4bd5d2e9970ef75f39f8ac4f368c1d8 Mon Sep 17 00:00:00 2001 From: Byeong-Sik Jeon Date: Wed, 15 Nov 2006 15:52:31 +0900 Subject: [PATCH] user32: Update the edit control when the IME composition string is emptied. --- dlls/user/edit.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/user/edit.c b/dlls/user/edit.c index 5b38b68440a..76f3e048baa 100644 --- a/dlls/user/edit.c +++ b/dlls/user/edit.c @@ -5335,7 +5335,7 @@ static void EDIT_GetCompositionStr(HWND hwnd, LPARAM CompFlag, EDITSTATE *es) dwBufLen = ImmGetCompositionStringW(hIMC, GCS_COMPSTR, NULL, 0); - if (dwBufLen <= 0) + if (dwBufLen < 0) { ImmReleaseContext(hwnd, hIMC); return; @@ -5349,7 +5349,8 @@ static void EDIT_GetCompositionStr(HWND hwnd, LPARAM CompFlag, EDITSTATE *es) return; } - ImmGetCompositionStringW(hIMC, GCS_COMPSTR, lpCompStr, dwBufLen); + if (dwBufLen) + ImmGetCompositionStringW(hIMC, GCS_COMPSTR, lpCompStr, dwBufLen); lpCompStr[dwBufLen/sizeof(WCHAR)] = 0; if (CompFlag & GCS_COMPATTR)