[WIN32K]
authorKamil Hornicek <kamil.hornicek@reactos.org>
Sun, 4 Mar 2012 19:20:25 +0000 (19:20 +0000)
committerKamil Hornicek <kamil.hornicek@reactos.org>
Sun, 4 Mar 2012 19:20:25 +0000 (19:20 +0000)
Take the "unsignedness" of the index into account.

svn path=/trunk/; revision=56007

reactos/subsystems/win32/win32k/objects/path.c

index c5ad11f..f690323 100644 (file)
@@ -760,8 +760,11 @@ PATH_PolyDraw(PDC dc, const POINT *pts, const BYTE *types, DWORD cbPoints)
   lastmove.x = orig_pos.x = pdcattr->ptlCurrent.x;
   lastmove.y = orig_pos.y = pdcattr->ptlCurrent.y;
 
-  for (i = pPath->numEntriesUsed - 1; i >= 0; i--)
+  i = pPath->numEntriesUsed;
+
+  while (i != 0)
   {
+      i--;
       if (pPath->pFlags[i] == PT_MOVETO)
       {
          lastmove.x = pPath->pPoints[i].x;