Fix wrong structure size check in GetScrollBarInfo().

GetScrollBarInfo() failed when SCROLL_GetScrollBarRect() returned
FALSE - however, this is the case if the scrollbar is horizontal, and
not an error indicator.
This commit is contained in:
Frank Richter 2005-08-19 13:58:22 +00:00 committed by Alexandre Julliard
parent 00353712f2
commit ad53767109

View File

@ -1232,12 +1232,11 @@ static BOOL SCROLL_GetScrollBarInfo(HWND hwnd, LONG idObject, LPSCROLLBARINFO in
}
/* handle invalid data structure */
if (!info->cbSize != sizeof(*info))
if (info->cbSize != sizeof(*info))
return FALSE;
if (!SCROLL_GetScrollBarRect(hwnd, nBar, &info->rcScrollBar, &nDummy,
&info->dxyLineButton, &info->xyThumbTop))
return FALSE;
SCROLL_GetScrollBarRect(hwnd, nBar, &info->rcScrollBar, &nDummy,
&info->dxyLineButton, &info->xyThumbTop);
info->xyThumbBottom = info->xyThumbTop + info->dxyLineButton;