Fixed division by zero, when range is 0.

This commit is contained in:
Michael Günnewig 2002-10-15 01:20:51 +00:00 committed by Alexandre Julliard
parent fc144ada89
commit 2cf92565df
1 changed files with 2 additions and 0 deletions

View File

@ -407,6 +407,8 @@ TRACKBAR_DrawOneTic (TRACKBAR_INFO *infoPtr, HDC hdc, LONG ticPos, int flags)
}
range = infoPtr->lRangeMax - infoPtr->lRangeMin;
if (range == 0)
range = 1; /* to avoid division by zero */
if (flags & TIC_SELECTIONMARK) {
indent = (flags & TIC_SELECTIONMARKMIN) ? -1 : 1;