user: Fixed offset check for the DWLP_DLGPROC case in SetWindowLong.

This commit is contained in:
Alexandre Julliard 2006-05-09 13:50:53 +02:00
parent a95c58b871
commit 5326e304d0
1 changed files with 1 additions and 1 deletions

View File

@ -2006,7 +2006,7 @@ static LONG_PTR WIN_SetWindowLong( HWND hwnd, INT offset, LONG_PTR newval,
case GWLP_USERDATA:
break;
case DWLP_DLGPROC:
if ((wndPtr->cbWndExtra + sizeof(LONG_PTR) >= DWLP_DLGPROC) && (wndPtr->flags & WIN_ISDIALOG))
if ((wndPtr->cbWndExtra - sizeof(LONG_PTR) >= DWLP_DLGPROC) && (wndPtr->flags & WIN_ISDIALOG))
{
WNDPROC *ptr = (WNDPROC *)((char *)wndPtr->wExtra + DWLP_DLGPROC);
retval = (ULONG_PTR)WINPROC_GetProc( *ptr, type );