Commit d837d9db authored by Gerard Patel's avatar Gerard Patel Committed by Alexandre Julliard

Protect against programs creating parts with negative width.

parent 5890c099
......@@ -128,6 +128,8 @@ STATUSBAR_RefreshPart (HWND hwnd, STATUSWINDOWPART *part, HDC hdc, int itemID)
if (!IsWindowVisible (hwnd))
return;
if (part->bound.right < part->bound.left) return;
if (self->clrBk != CLR_DEFAULT)
hbrBk = CreateSolidBrush (self->clrBk);
else
......@@ -327,7 +329,6 @@ STATUSBAR_GetParts (HWND hwnd, WPARAM wParam, LPARAM lParam)
num_parts = (INT) wParam;
parts = (LPINT) lParam;
if (parts) {
return (infoPtr->numParts);
for (i = 0; i < num_parts; i++) {
parts[i] = infoPtr->parts[i].x;
}
......
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