From 4469eb3e0eeb28f26d69c36b760dec9af3f27b8c Mon Sep 17 00:00:00 2001 From: Mark Cave-Ayland Date: Fri, 7 Nov 2008 14:21:09 +0000 Subject: [PATCH] Fix GBT#69: ST_Translate crashes when fed circular string. lwgeom_affine_recursive() needs to know about the new lwgeom_getcurve_inspected() function. git-svn-id: http://svn.osgeo.org/postgis/trunk@3277 b70326c6-7e19-0410-871a-916f4a2858ee --- lwgeom/lwgeom_functions_basic.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lwgeom/lwgeom_functions_basic.c b/lwgeom/lwgeom_functions_basic.c index 4b609ced9..c811ad1e4 100644 --- a/lwgeom/lwgeom_functions_basic.c +++ b/lwgeom/lwgeom_functions_basic.c @@ -3197,6 +3197,7 @@ lwgeom_affine_recursive(uchar *serialized, LWLINE *line=NULL; LWPOINT *point=NULL; LWPOLY *poly=NULL; + LWCURVE *curve=NULL; uchar *subgeom=NULL; point = lwgeom_getpoint_inspected(inspected, i); @@ -3238,6 +3239,18 @@ lwgeom_affine_recursive(uchar *serialized, continue; } + curve = lwgeom_getcurve_inspected(inspected, i); + if (curve != NULL) + { + lwgeom_affine_ptarray(curve->points, + afac, bfac, cfac, + dfac, efac, ffac, + gfac, hfac, ifac, + xoff, yoff, zoff); + lwgeom_release((LWGEOM *)curve); + continue; + } + subgeom = lwgeom_getsubgeometry_inspected(inspected, i); if ( subgeom == NULL ) { -- 2.50.0