From 26556323c051530afc45d21e2e9013d0ae601b7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Tue, 14 Oct 2014 20:59:22 -0400 Subject: [PATCH] libfreerdp-color: fix 24bpp copy --- libfreerdp/codec/color.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libfreerdp/codec/color.c b/libfreerdp/codec/color.c index 65f292a55..96a17adb3 100644 --- a/libfreerdp/codec/color.c +++ b/libfreerdp/codec/color.c @@ -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;