Commit cfe2b3fa authored by Vincent Povirk's avatar Vincent Povirk Committed by Alexandre Julliard

gdiplus: Don't require specific gdi+ versions in metafile structures.

Based on testing of manually edited metafiles, only the signature portion of version fields are tested, not the version number. Signed-off-by: 's avatarVincent Povirk <vincent@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 88abcf3a
......@@ -41,6 +41,7 @@
#define VERSION_MAGIC 0xdbc01001
#define VERSION_MAGIC2 0xdbc01002
#define VALID_MAGIC(x) (((x) & 0xfffff000) == 0xdbc01000)
#define TENSION_CONST (0.3)
#define GIF_DISPOSE_UNSPECIFIED 0
......
......@@ -961,7 +961,7 @@ static GpStatus read_element(struct memory_buffer *mbuf, GpRegion *region, regio
ERR("failed to read path header\n");
return InvalidParameter;
}
if (path_header->magic != VERSION_MAGIC)
if (!VALID_MAGIC(path_header->magic))
{
ERR("invalid path header magic %#x\n", path_header->magic);
return InvalidParameter;
......@@ -1069,8 +1069,7 @@ GpStatus WINGDIPAPI GdipCreateRegionRgnData(GDIPCONST BYTE *data, INT size, GpRe
init_memory_buffer(&mbuf, data, size);
region_header = buffer_read(&mbuf, sizeof(*region_header));
if (!region_header || (region_header->magic != VERSION_MAGIC &&
region_header->magic != VERSION_MAGIC2))
if (!region_header || !VALID_MAGIC(region_header->magic))
return InvalidParameter;
status = GdipCreateRegion(region);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment