- Patch by Marcus Meissner : EM_REPLACESEL Handle OOM error.
- Will sync to wine after a review of new WOW implementation.

svn path=/trunk/; revision=44987
This commit is contained in:
James Tabor 2010-01-07 18:55:24 +00:00
parent 4c9596a9ad
commit 432bd7570f

View file

@ -5004,8 +5004,8 @@ LRESULT WINAPI EditWndProc_common( HWND hwnd, UINT msg,
{
LPSTR textA = (LPSTR)lParam;
INT countW = MultiByteToWideChar(CP_ACP, 0, textA, -1, NULL, 0);
if((textW = HeapAlloc(GetProcessHeap(), 0, countW * sizeof(WCHAR))))
MultiByteToWideChar(CP_ACP, 0, textA, -1, textW, countW);
if(!(textW = HeapAlloc(GetProcessHeap(), 0, countW * sizeof(WCHAR)))) break;
MultiByteToWideChar(CP_ACP, 0, textA, -1, textW, countW);
}
EDIT_EM_ReplaceSel(es, (BOOL)wParam, textW, TRUE, TRUE);