From: Paul Ramsey Date: Mon, 30 Jan 2012 21:52:47 +0000 (+0000) Subject: ST_Segmentize returns invalid LINESTRING for zero-length input (#1304) X-Git-Tag: 2.0.0alpha3~28 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=883b8860cb03f56bc90241d5648f6f09fa62baca;p=postgis ST_Segmentize returns invalid LINESTRING for zero-length input (#1304) git-svn-id: http://svn.osgeo.org/postgis/trunk@8971 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/liblwgeom/ptarray.c b/liblwgeom/ptarray.c index 3eff56546..53fdab043 100644 --- a/liblwgeom/ptarray.c +++ b/liblwgeom/ptarray.c @@ -428,7 +428,7 @@ ptarray_segmentize2d(const POINTARRAY *ipa, double dist) } else /* copy second point */ { - ptarray_append_point(opa, &p2, LW_FALSE); + ptarray_append_point(opa, &p2, (ipa->npoints==2)?LW_TRUE:LW_FALSE); p1 = p2; ipoff++; }