Changelog: - Avoid division by zero in TRACKBAR_GetTicPos - Manage negative range TRACKBAR_DrawOneTic
Index: dlls/comctl32/trackbar.c =================================================================== RCS file: /home/wine/wine/dlls/comctl32/trackbar.c,v retrieving revision 1.50 diff -u -u -r1.50 trackbar.c --- dlls/comctl32/trackbar.c 2 Aug 2003 00:44:00 -0000 1.50 +++ dlls/comctl32/trackbar.c 2 Aug 2003 05:52:42 -0000 @@ -442,7 +442,7 @@ }
range = infoPtr->lRangeMax - infoPtr->lRangeMin; - if (range == 0) + if (range <= 0) range = 1; /* to avoid division by zero */
if (flags & TIC_SELECTIONMARK) { @@ -966,6 +966,7 @@
tic = TRACKBAR_GetTic (infoPtr, iTic); range = infoPtr->lRangeMax - infoPtr->lRangeMin; + if (range <= 0) range = 1; width = infoPtr->rcChannel.right - infoPtr->rcChannel.left; pos = infoPtr->rcChannel.left + (width * tic) / range;
_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail