Commit 6a237bdb authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

comctl32/trackbar: Fix mouse position to thumb position conversion rounding.

parent cd55d747
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <math.h>
#include "windef.h" #include "windef.h"
#include "winbase.h" #include "winbase.h"
...@@ -203,7 +204,7 @@ TRACKBAR_ConvertPlaceToPosition (const TRACKBAR_INFO *infoPtr, int place) ...@@ -203,7 +204,7 @@ TRACKBAR_ConvertPlaceToPosition (const TRACKBAR_INFO *infoPtr, int place)
pos = infoPtr->lRangeMin; pos = infoPtr->lRangeMin;
TRACE("%.2f\n", pos); TRACE("%.2f\n", pos);
return (LONG)(pos + 0.5); return (LONG)floor(pos + 0.5);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment