Commit fbfef7e6 authored by Ulrich Sibiller's avatar Ulrich Sibiller

Drawable.c: fix logic broken by scope cleanup

xp must be declared outside the while loop! xp was reset in each interation despite being increased at the iteration's end! To protect against this happening again replace the while loop by a for loop that references xp. Bug introduced by d94f4727
parent 32b64d7d
......@@ -2261,11 +2261,11 @@ void nxagentPointsToDirtyRegion(DrawablePtr pDrawable, int mode,
{
RegionPtr pRegion = RegionCreate(NullBox, 1);
int np = nPoints;
while (np--)
xPoint *xp = pPoints;
for (int np = nPoints; np--; xp++)
{
BoxRec box;
xPoint *xp = pPoints;
if (CoordModePrevious)
{
......@@ -2294,8 +2294,6 @@ void nxagentPointsToDirtyRegion(DrawablePtr pDrawable, int mode,
RegionUnion(pRegion, pRegion, &tmpRegion);
RegionUninit(&tmpRegion);
xp++;
}
BoxRec extents = *RegionExtents(pRegion);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment