Protect against programs creating parts with negative width.
This commit is contained in:
parent
5890c09983
commit
d837d9db63
|
@ -128,6 +128,8 @@ STATUSBAR_RefreshPart (HWND hwnd, STATUSWINDOWPART *part, HDC hdc, int itemID)
|
||||||
if (!IsWindowVisible (hwnd))
|
if (!IsWindowVisible (hwnd))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (part->bound.right < part->bound.left) return;
|
||||||
|
|
||||||
if (self->clrBk != CLR_DEFAULT)
|
if (self->clrBk != CLR_DEFAULT)
|
||||||
hbrBk = CreateSolidBrush (self->clrBk);
|
hbrBk = CreateSolidBrush (self->clrBk);
|
||||||
else
|
else
|
||||||
|
@ -327,7 +329,6 @@ STATUSBAR_GetParts (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
num_parts = (INT) wParam;
|
num_parts = (INT) wParam;
|
||||||
parts = (LPINT) lParam;
|
parts = (LPINT) lParam;
|
||||||
if (parts) {
|
if (parts) {
|
||||||
return (infoPtr->numParts);
|
|
||||||
for (i = 0; i < num_parts; i++) {
|
for (i = 0; i < num_parts; i++) {
|
||||||
parts[i] = infoPtr->parts[i].x;
|
parts[i] = infoPtr->parts[i].x;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue