]> granicus.if.org Git - postgis/commitdiff
Error in empty short circuit (#1828)
authorPaul Ramsey <pramsey@cleverelephant.ca>
Thu, 17 May 2012 11:54:43 +0000 (11:54 +0000)
committerPaul Ramsey <pramsey@cleverelephant.ca>
Thu, 17 May 2012 11:54:43 +0000 (11:54 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@9744 b70326c6-7e19-0410-871a-916f4a2858ee

liblwgeom/lwgeodetic.c

index 6f24ab00517d6e8bf614c8aad303307da8de0339..be2ec9dc1d5aeb58ede08cc210a936640e38dc0b 100644 (file)
@@ -1548,7 +1548,7 @@ static double ptarray_distance_spheroid(const POINTARRAY *pa1, const POINTARRAY
        distance = MAXFLOAT;
 
        /* Empty point arrays? Return negative */
-       if ( pa1->npoints == 0 || pa1->npoints == 0 )
+       if ( pa1->npoints == 0 || pa2->npoints == 0 )
                return -1.0;
 
        /* Handle point/point case here */