From 911e19078db854ca0f0dcc5b84c9fe3c5f6c643b Mon Sep 17 00:00:00 2001 From: Huw D M Davies Date: Thu, 13 May 1999 18:46:46 +0000 Subject: [PATCH] Fixed a couple of memcpy errors. --- graphics/enhmetafiledrv/graphics.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/graphics/enhmetafiledrv/graphics.c b/graphics/enhmetafiledrv/graphics.c index 8a6dc36a12c..d62b1f88f08 100644 --- a/graphics/enhmetafiledrv/graphics.c +++ b/graphics/enhmetafiledrv/graphics.c @@ -338,7 +338,7 @@ EMFDRV_Polylinegon( DC *dc, const POINT* pt, INT count, DWORD iType ) } emr->cptl = count; - memcpy(emr->aptl, pt, size); + memcpy(emr->aptl, pt, count * sizeof(POINTL)); ret = EMFDRV_WriteRecord( dc, &emr->emr ); if(ret) @@ -409,7 +409,7 @@ EMFDRV_PolyPolylinegon( DC *dc, const POINT* pt, const INT* counts, UINT polys, emr->nPolys = polys; emr->cptl = cptl; memcpy(emr->aPolyCounts, counts, polys * sizeof(DWORD)); - memcpy(emr->aPolyCounts + polys, pt, cptl * sizeof(POINT)); + memcpy(emr->aPolyCounts + polys, pt, cptl * sizeof(POINTL)); ret = EMFDRV_WriteRecord( dc, &emr->emr ); if(ret) EMFDRV_UpdateBBox( dc, &emr->rclBounds );