Signed-off-by: Andrey Gusev andrey.goosev@gmail.com --- dlls/comctl32/rebar.c | 2 +- dlls/comctl32/tab.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/comctl32/rebar.c b/dlls/comctl32/rebar.c index 20ce49b3f9..2d00dfd7ca 100644 --- a/dlls/comctl32/rebar.c +++ b/dlls/comctl32/rebar.c @@ -2090,7 +2090,7 @@ REBAR_HandleUDDrag (REBAR_INFO *infoPtr, const POINT *ptsmove) INT iHitBand, iRowBegin, iNextRowBegin; REBAR_BAND *hitBand, *rowBeginBand;
- if(infoPtr->uNumBands <= 0) + if(infoPtr->uNumBands == 0) ERR("There are no bands in this rebar\n");
/* Up/down dragging can only occur when there is more than one diff --git a/dlls/comctl32/tab.c b/dlls/comctl32/tab.c index f8a54935ca..2e17e142f6 100644 --- a/dlls/comctl32/tab.c +++ b/dlls/comctl32/tab.c @@ -365,7 +365,7 @@ static BOOL TAB_InternalGetItemRect( RECT tmpItemRect,clientRect;
/* Perform a sanity check and a trivial visibility check. */ - if ( (infoPtr->uNumItem <= 0) || + if ( (infoPtr->uNumItem == 0) || (itemIndex >= infoPtr->uNumItem) || (!(((infoPtr->dwStyle & TCS_MULTILINE) || (infoPtr->dwStyle & TCS_VERTICAL))) && (itemIndex < infoPtr->leftmostVisible)))