comctl32: Fix division by zero.

This commit is contained in:
Vladimir Pankratov 2009-07-14 14:01:23 +05:00 committed by Alexandre Julliard
parent f421746980
commit 585e8dfbb4
1 changed files with 1 additions and 1 deletions

View File

@ -4846,7 +4846,7 @@ TOOLBAR_SetRows (TOOLBAR_INFO *infoPtr, WPARAM wParam, LPRECT lprc)
if (seps) FIXME("Separators unhandled\n");
/* Round up so more per line, i.e., less rows */
idealWrap = (infoPtr->nNumButtons - hidden + (rows-1)) / rows;
idealWrap = (infoPtr->nNumButtons - hidden + (rows-1)) / (rows ? rows : 1);
/* Calculate ideal wrap point if we are allowed to grow, but cannot
achieve the requested number of rows. */