[PATCH] quartz/tests: Fix overflow in 32-bit time calculation

Alex Henrie alexhenrie24 at gmail.com
Wed Jun 3 23:38:39 CDT 2020


Signed-off-by: Alex Henrie <alexhenrie24 at gmail.com>
---
This fixes intermittent testbot errors on Windows XP.
---
 dlls/quartz/tests/systemclock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/quartz/tests/systemclock.c b/dlls/quartz/tests/systemclock.c
index 71a7ac26d8..f13e89abed 100644
--- a/dlls/quartz/tests/systemclock.c
+++ b/dlls/quartz/tests/systemclock.c
@@ -183,7 +183,7 @@ static void test_get_time(void)
     if (pGetTickCount64)
         time2 = pGetTickCount64() * 10000;
     else
-        time2 = GetTickCount() * 10000;
+        time2 = (REFERENCE_TIME)GetTickCount() * 10000;
     ok(hr == S_OK, "Got hr %#x.\n", hr);
     ok(time1 % 10000 == 0, "Expected no less than 1ms coarseness, but got time %s.\n",
             wine_dbgstr_longlong(time1));
-- 
2.27.0




More information about the wine-devel mailing list