EXA: Fix off-by-one in polyline drawing.

(cherry picked from commit d502521c36)
This commit is contained in:
Pierre Willenbrock 2007-10-23 16:45:13 +02:00 committed by Daniel Stone
parent 9e9eeca2b0
commit 6afcf996ca

View File

@ -535,7 +535,7 @@ exaPolylines(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt,
x1 = ppt[0].x;
y1 = ppt[0].y;
/* If we have any non-horizontal/vertical, fall back. */
for (i = 0; i < npt; i++) {
for (i = 0; i < npt - 1; i++) {
if (mode == CoordModePrevious) {
x2 = x1 + ppt[i + 1].x;
y2 = y1 + ppt[i + 1].y;