user32: EM_REPLACESEL - handle OOM error.
This commit is contained in:
parent
4d96ffb52b
commit
69bf18567f
@ -4525,8 +4525,8 @@ LRESULT EditWndProc_common( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, B
|
|||||||
{
|
{
|
||||||
LPSTR textA = (LPSTR)lParam;
|
LPSTR textA = (LPSTR)lParam;
|
||||||
INT countW = MultiByteToWideChar(CP_ACP, 0, textA, -1, NULL, 0);
|
INT countW = MultiByteToWideChar(CP_ACP, 0, textA, -1, NULL, 0);
|
||||||
if((textW = HeapAlloc(GetProcessHeap(), 0, countW * sizeof(WCHAR))))
|
if (!(textW = HeapAlloc(GetProcessHeap(), 0, countW * sizeof(WCHAR)))) break;
|
||||||
MultiByteToWideChar(CP_ACP, 0, textA, -1, textW, countW);
|
MultiByteToWideChar(CP_ACP, 0, textA, -1, textW, countW);
|
||||||
}
|
}
|
||||||
|
|
||||||
EDIT_EM_ReplaceSel(es, (BOOL)wParam, textW, TRUE, TRUE);
|
EDIT_EM_ReplaceSel(es, (BOOL)wParam, textW, TRUE, TRUE);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user