gdiplus: Correct EMF record size calculation.

Vincent Povirk madewokherd at gmail.com
Tue Mar 12 16:04:49 CDT 2013


Wine's PlayEnhMetaFileRecord implementation doesn't seem to care much
about this, but we subtract 8 bytes from the size of an EMF record
when enumerating it in GDI+, so we have to add them back here.
-------------- next part --------------
From 37b84938153b68758864651a6c48b01ccd4dda2c Mon Sep 17 00:00:00 2001
From: Vincent Povirk <vincent at codeweavers.com>
Date: Tue, 12 Mar 2013 15:54:41 -0500
Subject: [PATCH 2/2] gdiplus: Correct EMF record size calculation.

---
 dlls/gdiplus/metafile.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/gdiplus/metafile.c b/dlls/gdiplus/metafile.c
index ae905fc..f03557b 100644
--- a/dlls/gdiplus/metafile.c
+++ b/dlls/gdiplus/metafile.c
@@ -410,7 +410,7 @@ GpStatus WINGDIPAPI GdipPlayMetafileRecord(GDIPCONST GpMetafile *metafile,
             if (record)
             {
                 record->iType = recordType;
-                record->nSize = dataSize;
+                record->nSize = dataSize + 8;
                 memcpy(record->dParm, data, dataSize);
 
                 PlayEnhMetaFileRecord(metafile->playback_dc, metafile->handle_table,
-- 
1.8.1.2


More information about the wine-patches mailing list