[postgis-tickets] r14461 - Fix misuse of getPoint2d_cp in 2.0, closes #2232
Paul Ramsey
pramsey at cleverelephant.ca
Mon Nov 30 14:00:27 PST 2015
Author: pramsey
Date: 2015-11-30 14:00:27 -0800 (Mon, 30 Nov 2015)
New Revision: 14461
Modified:
branches/2.0/liblwgeom/lwout_svg.c
Log:
Fix misuse of getPoint2d_cp in 2.0, closes #2232
Modified: branches/2.0/liblwgeom/lwout_svg.c
===================================================================
--- branches/2.0/liblwgeom/lwout_svg.c 2015-11-30 18:39:50 UTC (rev 14460)
+++ branches/2.0/liblwgeom/lwout_svg.c 2015-11-30 22:00:27 UTC (rev 14461)
@@ -550,7 +550,7 @@
char *ptr;
char sx[OUT_MAX_DIGS_DOUBLE+OUT_MAX_DOUBLE_PRECISION+1];
char sy[OUT_MAX_DIGS_DOUBLE+OUT_MAX_DOUBLE_PRECISION+1];
- const POINT2D *pt;
+ POINT2D pt;
double f = 1.0;
double dx, dy, x, y, accum_x, accum_y;
@@ -566,10 +566,10 @@
else end = pa->npoints - 1;
/* Starting point */
- pt = getPoint2d_cp(pa, 0);
+ getPoint2d_p(pa, 0, &pt);
- x = round(pt->x*f)/f;
- y = round(pt->y*f)/f;
+ x = round(pt.x*f)/f;
+ y = round(pt.y*f)/f;
if (fabs(x) < OUT_MAX_DOUBLE)
sprintf(sx, "%.*f", precision, x);
@@ -594,10 +594,10 @@
{
// lpt = pt;
- pt = getPoint2d_cp(pa, i);
+ getPoint2d_p(pa, i, &pt);
- x = round(pt->x*f)/f;
- y = round(pt->y*f)/f;
+ x = round(pt.x*f)/f;
+ y = round(pt.y*f)/f;
dx = x - accum_x;
dy = y - accum_y;
More information about the postgis-tickets
mailing list