From e5b3a693dd7266d597e3243e5be7883e3e6de56d Mon Sep 17 00:00:00 2001 From: Huw D M Davies Date: Fri, 14 Apr 2000 14:07:30 +0000 Subject: [PATCH] Don't close groups of polylines. --- graphics/x11drv/graphics.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/graphics/x11drv/graphics.c b/graphics/x11drv/graphics.c index 46c4a2c53f9..333275974dd 100644 --- a/graphics/x11drv/graphics.c +++ b/graphics/x11drv/graphics.c @@ -1120,7 +1120,7 @@ X11DRV_PolyPolyline( DC *dc, const POINT* pt, const DWORD* counts, DWORD polylin X11DRV_DIB_UpdateDIBSection(dc, FALSE); for (i = 0; i < polylines; i++) if (counts[i] > max) max = counts[i]; - if (!(points = HeapAlloc( GetProcessHeap(), 0, sizeof(XPoint) * (max+1) ))) + if (!(points = HeapAlloc( GetProcessHeap(), 0, sizeof(XPoint) * max ))) { WARN("No memory to convert POINTs to XPoints!\n"); return FALSE; @@ -1133,9 +1133,8 @@ X11DRV_PolyPolyline( DC *dc, const POINT* pt, const DWORD* counts, DWORD polylin points[j].y = dc->w.DCOrgY + YLPTODP( dc, pt->y ); pt++; } - points[j] = points[0]; TSXDrawLines( display, physDev->drawable, physDev->gc, - points, j + 1, CoordModeOrigin ); + points, j, CoordModeOrigin ); } /* Update the DIBSection of the dc's bitmap */