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

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2016-07-15 00:37:35 +03:00 committed by Alexandre Julliard
parent cd55d74742
commit 6a237bdb60
1 changed files with 2 additions and 1 deletions

View File

@ -34,6 +34,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "windef.h"
#include "winbase.h"
@ -203,7 +204,7 @@ TRACKBAR_ConvertPlaceToPosition (const TRACKBAR_INFO *infoPtr, int place)
pos = infoPtr->lRangeMin;
TRACE("%.2f\n", pos);
return (LONG)(pos + 0.5);
return (LONG)floor(pos + 0.5);
}