Mercurial > dwindows
changeset 1195:9b021f787ad1
Fix issues with OS/2 percent bar at the upper end of range.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Wed, 28 Sep 2011 15:29:05 +0000 |
parents | d2f37fda40df |
children | 452a5b1b2aa5 |
files | os2/dw.c |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/os2/dw.c Wed Sep 28 15:03:50 2011 +0000 +++ b/os2/dw.c Wed Sep 28 15:29:05 2011 +0000 @@ -6735,7 +6735,10 @@ else if(range) { /* Otherwise set the position as usual */ - int mypos = ((float)position/100)*range; + int mypos = (((float)position)/100)*range; + + if(mypos >= range) + mypos = range - 1; _dw_int_set(handle, mypos); WinSendMsg(handle, SLM_SETSLIDERINFO, MPFROM2SHORT(SMA_SLIDERARMPOSITION,SMA_RANGEVALUE), (MPARAM)mypos);