Commit 1e6063d5 authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

Use rect only if there are flags.

parent 160be64e
......@@ -37,12 +37,12 @@ static BOOL MFDRV_MetaExtTextOut( PHYSDEV dev, short x, short y, UINT16 flags,
BOOL ret;
DWORD len;
METARECORD *mr;
if((!flags && rect) || (flags && !rect))
WARN("Inconsistent flags and rect\n");
if (flags && !rect)
WARN("Inconsistent flags and rect\n");
len = sizeof(METARECORD) + (((count + 1) >> 1) * 2) + 2 * sizeof(short)
+ sizeof(UINT16);
if(rect)
if (rect&&flags)
len += sizeof(RECT16);
if (lpDx)
len+=count*sizeof(INT16);
......@@ -55,10 +55,10 @@ static BOOL MFDRV_MetaExtTextOut( PHYSDEV dev, short x, short y, UINT16 flags,
*(mr->rdParm + 1) = x;
*(mr->rdParm + 2) = count;
*(mr->rdParm + 3) = flags;
if (rect) memcpy(mr->rdParm + 4, rect, sizeof(RECT16));
memcpy(mr->rdParm + (rect ? 8 : 4), str, count);
if (rect&&flags) memcpy(mr->rdParm + 4, rect, sizeof(RECT16));
memcpy(mr->rdParm + ((rect&&flags) ? 8 : 4), str, count);
if (lpDx)
memcpy(mr->rdParm + (rect ? 8 : 4) + ((count + 1) >> 1),lpDx,
memcpy(mr->rdParm + ((rect&&flags) ? 8 : 4) + ((count + 1) >> 1),lpDx,
count*sizeof(INT16));
ret = MFDRV_WriteRecord( dev, mr, mr->rdSize * 2);
HeapFree( GetProcessHeap(), 0, mr);
......
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