libfreerdp-color: fix 24bpp copy

This commit is contained in:
Marc-André Moreau 2014-10-14 20:59:22 -04:00
parent e0a063a3f9
commit 26556323c0

View File

@ -2332,15 +2332,15 @@ int freerdp_image24_copy(BYTE* pDstData, DWORD DstFormat, int nDstStep, int nXDs
dstFlip = FREERDP_PIXEL_FORMAT_FLIP(DstFormat);
dstType = FREERDP_PIXEL_FORMAT_TYPE(DstFormat);
nSrcPad = (nSrcStep - (nWidth * srcBytesPerPixel));
nDstPad = (nDstStep - (nWidth * dstBytesPerPixel));
if (nSrcStep < 0)
nSrcStep = srcBytesPerPixel * nWidth;
if (nDstStep < 0)
nDstStep = dstBytesPerPixel * nWidth;
nSrcPad = (nSrcStep - (nWidth * srcBytesPerPixel));
nDstPad = (nDstStep - (nWidth * dstBytesPerPixel));
if (srcFlip != dstFlip)
vFlip = TRUE;