Module: wine Branch: master Commit: 36e6ea9767473204b0e1635a1d54af3868fa0188 URL: https://source.winehq.org/git/wine.git/?a=commit;h=36e6ea9767473204b0e1635a1...
Author: Pengpeng Dong dongpengpeng@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@uniontech.com Signed-off-by: Esme Povirk esme@codeweavers.com Signed-off-by: Alexandre Julliard julliard@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); } }