mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 10:41:12 +00:00
Allow null pointers for EM_GETSEL message (as MSDN says).
This commit is contained in:
parent
74afc7f12e
commit
86f575cdc1
1 changed files with 8 additions and 4 deletions
|
@ -916,10 +916,14 @@ LRESULT WINAPI RichEditANSIWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lP
|
|||
return 0;
|
||||
case EM_GETSEL:
|
||||
{
|
||||
ME_GetSelection(editor, (int *)wParam, (int *)lParam);
|
||||
if (!((wParam|lParam) & 0xFFFF0000))
|
||||
return (lParam<<16)|wParam;
|
||||
return -1;
|
||||
/* Note: wParam/lParam can be NULL */
|
||||
UINT from, to;
|
||||
PUINT pfrom = wParam ? (PUINT)wParam : &from;
|
||||
PUINT pto = lParam ? (PUINT)lParam : &to;
|
||||
ME_GetSelection(editor, pfrom, pto);
|
||||
if ((*pfrom|*pto) & 0xFFFF0000)
|
||||
return -1;
|
||||
return MAKELONG(*pfrom,*pto);
|
||||
}
|
||||
case EM_EXGETSEL:
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue