[PATCH 0/1] MR3861: gdiplus: Copy the compound array in GdipClonePen().
From: Huw Davies <huw(a)codeweavers.com> --- 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); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/3861
I think we also need to set compound_array_size here. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/3861#note_45607
On Fri Sep 15 20:38:13 2023 +0000, Esme Povirk wrote:
I think we also need to set compound_array_size here. Oh never mind, it's covered by the initial copy.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/3861#note_45608
This merge request was approved by Esme Povirk. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/3861
On Fri Sep 15 20:39:40 2023 +0000, Esme Povirk wrote:
Oh never mind, it's covered by the initial copy. Yes, exactly. Just like `numdashes` above this.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/3861#note_45611
participants (3)
-
Esme Povirk (@madewokherd) -
Huw Davies -
Huw Davies (@huw)