Pengpeng Dong : gdiplus: Initialize the dead point coordinates in "GpPointF, *ptf" to 0.

Alexandre Julliard julliard at winehq.org
Fri Sep 18 15:52:50 CDT 2020


Module: wine
Branch: master
Commit: 36e6ea9767473204b0e1635a1d54af3868fa0188
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=36e6ea9767473204b0e1635a1d54af3868fa0188

Author: Pengpeng Dong <dongpengpeng at uniontech.com>
Date:   Thu Sep 10 11:01:20 2020 +0800

gdiplus: Initialize the dead point coordinates in "GpPointF, *ptf" to 0.

Signed-off-by: Pengpeng Dong <dongpengpeng at uniontech.com>
Signed-off-by: Esme Povirk <esme at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/gdiplus/graphics.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c
index 868aea5642..1615f592d5 100644
--- a/dlls/gdiplus/graphics.c
+++ b/dlls/gdiplus/graphics.c
@@ -323,8 +323,15 @@ static void round_points(POINT *pti, GpPointF *ptf, INT count)
     int i;
 
     for(i = 0; i < count; i++){
-        pti[i].x = gdip_round(ptf[i].X);
-        pti[i].y = gdip_round(ptf[i].Y);
+        if(isnan(ptf[i].X))
+            pti[i].x = 0;
+        else
+            pti[i].x = gdip_round(ptf[i].X);
+
+        if(isnan(ptf[i].Y))
+            pti[i].y = 0;
+        else
+            pti[i].y = gdip_round(ptf[i].Y);
     }
 }
 




More information about the wine-cvs mailing list