From 5326e304d017669d2512ad69ab8a4057eb0ed118 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Tue, 9 May 2006 13:50:53 +0200 Subject: [PATCH] user: Fixed offset check for the DWLP_DLGPROC case in SetWindowLong. --- dlls/user/win.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/user/win.c b/dlls/user/win.c index 9fef05b2be..2cacdb883a 100644 --- a/dlls/user/win.c +++ b/dlls/user/win.c @@ -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 ); -- 2.32.0.93.g670b81a890