Alexandre Julliard : user32: Fix wraparound check to avoid gcc optimization.
Alexandre Julliard
julliard at winehq.org
Mon Nov 26 16:20:12 CST 2018
Module: wine
Branch: master
Commit: 7507541a5bac5a42558610acebd1cf70c02cc7a9
URL: https://source.winehq.org/git/wine.git/?a=commit;h=7507541a5bac5a42558610acebd1cf70c02cc7a9
Author: Alexandre Julliard <julliard at winehq.org>
Date: Mon Nov 26 20:17:30 2018 +0100
user32: Fix wraparound check to avoid gcc optimization.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/user32/win.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/user32/win.c b/dlls/user32/win.c
index 95f5ac7..dd6142d 100644
--- a/dlls/user32/win.c
+++ b/dlls/user32/win.c
@@ -1611,8 +1611,8 @@ HWND WIN_CreateWindowEx( CREATESTRUCTW *cs, LPCWSTR className, HINSTANCE module,
if (cy < 0) cy = 0;
SetRect( &rect, cs->x, cs->y, cs->x + cx, cs->y + cy );
/* check for wraparound */
- if (cs->x + cx < cs->x) rect.right = 0x7fffffff;
- if (cs->y + cy < cs->y) rect.bottom = 0x7fffffff;
+ if (cs->x > 0x7fffffff - cx) rect.right = 0x7fffffff;
+ if (cs->y > 0x7fffffff - cy) rect.bottom = 0x7fffffff;
if (!set_window_pos( hwnd, 0, SWP_NOZORDER | SWP_NOACTIVATE, &rect, &rect, NULL )) goto failed;
/* send WM_NCCREATE */
More information about the wine-cvs
mailing list