xfreerdp: fix egfx SurfaceToSurface off-by-one

This commit is contained in:
Marc-André Moreau 2014-06-25 18:00:48 -04:00
parent 95a0d96b58
commit c20c3abdf1

View File

@ -27,9 +27,6 @@ int xf_ResetGraphics(RdpgfxClientContext* context, RDPGFX_RESET_GRAPHICS_PDU* re
{
xfContext* xfc = (xfContext*) context->custom;
printf("xf_ResetGraphics: width: %d height: %d\n",
resetGraphics->width, resetGraphics->height);
if (xfc->rfx)
{
rfx_context_free(xfc->rfx);
@ -376,9 +373,6 @@ int xf_CreateSurface(RdpgfxClientContext* context, RDPGFX_CREATE_SURFACE_PDU* cr
xfGfxSurface* surface;
xfContext* xfc = (xfContext*) context->custom;
printf("xf_CreateSurface: surfaceId: %d width: %d height: %d format: 0x%02X\n",
createSurface->surfaceId, createSurface->width, createSurface->height, createSurface->pixelFormat);
surface = (xfGfxSurface*) calloc(1, sizeof(xfGfxSurface));
if (!surface)
@ -409,8 +403,6 @@ int xf_DeleteSurface(RdpgfxClientContext* context, RDPGFX_DELETE_SURFACE_PDU* de
surface = (xfGfxSurface*) context->GetSurfaceData(context, deleteSurface->surfaceId);
printf("xf_DeleteSurface: surfaceId: %d\n", deleteSurface->surfaceId);
if (surface)
{
XFree(surface->image);
@ -496,8 +488,8 @@ int xf_SurfaceToSurface(RdpgfxClientContext* context, RDPGFX_SURFACE_TO_SURFACE_
if (!surfaceSrc || !surfaceDst)
return -1;
nWidth = rectSrc->right - rectSrc->left + 1;
nHeight = rectSrc->bottom - rectSrc->top + 1;
nWidth = rectSrc->right - rectSrc->left;
nHeight = rectSrc->bottom - rectSrc->top;
for (index = 0; index < surfaceToSurface->destPtsCount; index++)
{