Huw Davies : gdiplus: Copy the compound array in GdipClonePen().
Module: wine Branch: master Commit: 150b8dd013a686017eb696989dcc0b1b2121e7eb URL: https://gitlab.winehq.org/wine/wine/-/commit/150b8dd013a686017eb696989dcc0b1... Author: Huw Davies <huw(a)codeweavers.com> Date: Fri Sep 15 17:43:48 2023 +0100 gdiplus: Copy the compound array in GdipClonePen(). --- dlls/gdiplus/pen.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/dlls/gdiplus/pen.c b/dlls/gdiplus/pen.c index 6446b725e4d..fac31d6e84e 100644 --- a/dlls/gdiplus/pen.c +++ b/dlls/gdiplus/pen.c @@ -103,6 +103,7 @@ GpStatus WINGDIPAPI GdipClonePen(GpPen *pen, GpPen **clonepen) (*clonepen)->customend = NULL; (*clonepen)->brush = NULL; (*clonepen)->dashes = NULL; + (*clonepen)->compound_array = NULL; stat = GdipCloneBrush(pen->brush, &(*clonepen)->brush); @@ -121,6 +122,15 @@ GpStatus WINGDIPAPI GdipClonePen(GpPen *pen, GpPen **clonepen) stat = OutOfMemory; } + if (stat == Ok && pen->compound_array) + { + (*clonepen)->compound_array = heap_alloc_zero(pen->compound_array_size * sizeof(REAL)); + if ((*clonepen)->compound_array) + memcpy((*clonepen)->compound_array, pen->compound_array, pen->compound_array_size * sizeof(REAL)); + else + stat = OutOfMemory; + } + if (stat != Ok) { GdipDeletePen(*clonepen);
participants (1)
-
Alexandre Julliard