Module: wine Branch: master Commit: 7febd8db5dbcdca8bd172a6cabfbddb32afecf85 URL: https://gitlab.winehq.org/wine/wine/-/commit/7febd8db5dbcdca8bd172a6cabfbddb...
Author: Jeff Smith whydoubt@gmail.com Date: Wed Aug 2 22:15:28 2023 -0500
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)