[ENG]
authorJames Tabor <james.tabor@reactos.org>
Sat, 15 Jul 2017 03:58:42 +0000 (03:58 +0000)
committerJames Tabor <james.tabor@reactos.org>
Sat, 15 Jul 2017 03:58:42 +0000 (03:58 +0000)
- Patch by Katayama Hirofumi MZ : Add counts to path data. See CORE-13536.

svn path=/trunk/; revision=75347

reactos/win32ss/gdi/eng/pathobj.c

index 7acf8c4..72f27c2 100644 (file)
@@ -217,7 +217,6 @@ PATHOBJ_bPolyLineTo(
         /* store data */
         RtlZeroMemory(ppd, sizeof(EXTPATHDATA));
         ppd->pd.flags = PD_BEGINSUBPATH;
-        ppd->pd.count = cptfx;
 
         size = cptfx * sizeof(POINTFIX);
         pptfxNew = ExAllocatePoolWithTag(PagedPool, size, GDITAG_PATHOBJ);
@@ -228,6 +227,7 @@ PATHOBJ_bPolyLineTo(
         }
         RtlCopyMemory(pptfxNew, pptfx, size);
         ppd->pd.pptfx = pptfxNew;
+        ppd->pd.count = cptfx;
 
         /* set the subpath */
         pPathObj->ppdLast = pPathObj->ppdFirst = ppd;
@@ -277,6 +277,7 @@ PATHOBJ_bPolyLineTo(
 
         pptfxOld = ppdLast->pd.pptfx;
         ppdLast->pd.pptfx = pptfxNew;
+        ppdLast->pd.count += cptfx;
         ExFreePoolWithTag(pptfxOld, GDITAG_PATHOBJ);
     }
 
@@ -313,7 +314,6 @@ PATHOBJ_bPolyBezierTo(
         /* store data */
         RtlZeroMemory(ppd, sizeof(EXTPATHDATA));
         ppd->pd.flags = PD_BEGINSUBPATH | PD_BEZIERS;
-        ppd->pd.count = cptfx;
 
         size = cptfx * sizeof(POINTFIX);
         pptfxNew = ExAllocatePoolWithTag(PagedPool, size, GDITAG_PATHOBJ);
@@ -324,6 +324,7 @@ PATHOBJ_bPolyBezierTo(
         }
         RtlCopyMemory(pptfxNew, pptfx, size);
         ppd->pd.pptfx = pptfxNew;
+        ppd->pd.count = cptfx;
 
         /* set the subpath */
         pPathObj->ppdLast = pPathObj->ppdFirst = ppd;
@@ -373,6 +374,7 @@ PATHOBJ_bPolyBezierTo(
 
         pptfxOld = ppdLast->pd.pptfx;
         ppdLast->pd.pptfx = pptfxNew;
+        ppdLast->pd.count += cptfx;
         ExFreePoolWithTag(pptfxOld, GDITAG_PATHOBJ);
     }