From 7febd8db5dbcdca8bd172a6cabfbddb32afecf85 Mon Sep 17 00:00:00 2001 From: Jeff Smith Date: Wed, 2 Aug 2023 22:15:28 -0500 Subject: [PATCH] d2d1/tests: Use compare_uint() in compare_float() instead of abs(). The result of abs(INT_MIN) is INT_MIN, which breaks the ulps comparison. --- dlls/d2d1/tests/d2d1.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/dlls/d2d1/tests/d2d1.c b/dlls/d2d1/tests/d2d1.c index 4f53b4b7142..9480e1fc1a5 100644 --- a/dlls/d2d1/tests/d2d1.c +++ b/dlls/d2d1/tests/d2d1.c @@ -731,10 +731,7 @@ static BOOL compare_float(float f, float g, unsigned int ulps) if (y < 0) y = INT_MIN - y; - if (abs(x - y) > ulps) - return FALSE; - - return TRUE; + return compare_uint(x, y, ulps); } static BOOL compare_colour_f(const D2D1_COLOR_F *colour, float r, float g, float b, float a, unsigned int ulps)