From e1a0715b4a129db8eb2b6b04def4f2e8b3b390f1 Mon Sep 17 00:00:00 2001 From: Aric Stewart Date: Thu, 24 Apr 2008 10:34:01 -0500 Subject: [PATCH] comctl32: Fix an off-by-one error in toolbar TOOLBAR_SetHotItem. --- dlls/comctl32/toolbar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c index 7b2ef6e703b..9669a807c66 100644 --- a/dlls/comctl32/toolbar.c +++ b/dlls/comctl32/toolbar.c @@ -4761,7 +4761,7 @@ TOOLBAR_SetHotItem (HWND hwnd, WPARAM wParam) TRACE("hwnd = %p, nHit = %d\n", hwnd, (INT)wParam); - if ((INT)wParam > infoPtr->nNumButtons) + if ((INT)wParam >= infoPtr->nNumButtons) return infoPtr->nHotItem; if ((INT)wParam < 0)