Commit 7507541a authored by Alexandre Julliard's avatar Alexandre Julliard

user32: Fix wraparound check to avoid gcc optimization.

parent e8fd1c73
......@@ -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 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment