From: Paul Ramsey Date: Wed, 8 Oct 2008 04:25:40 +0000 (+0000) Subject: Fix minor logic error in intersects() bbox shortcut. X-Git-Tag: 1.4.0b1~647 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e5be9e7dcd995f0aae3fd5de1b8c88879674b8d6;p=postgis Fix minor logic error in intersects() bbox shortcut. git-svn-id: http://svn.osgeo.org/postgis/trunk@3075 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/lwgeom/lwgeom_geos_c.c b/lwgeom/lwgeom_geos_c.c index db29e626c..04cebb366 100644 --- a/lwgeom/lwgeom_geos_c.c +++ b/lwgeom/lwgeom_geos_c.c @@ -1424,7 +1424,7 @@ Datum contains(PG_FUNCTION_ARGS) getbox2d_p(SERIALIZED_FORM(geom2), &box2) ) { if ( ( box2.xmin < box1.xmin ) || ( box2.xmax > box1.xmax ) || - ( box2.ymin < box1.ymin ) || ( box2.ymax > box1.ymax ) ) + ( box2.ymin < box1.ymin ) || ( box2.ymax > box1.ymax ) ) { PG_RETURN_BOOL(FALSE); } @@ -2083,7 +2083,7 @@ Datum intersects(PG_FUNCTION_ARGS) if ( box2.xmax < box1.xmin ) PG_RETURN_BOOL(FALSE); if ( box2.xmin > box1.xmax ) PG_RETURN_BOOL(FALSE); if ( box2.ymax < box1.ymin ) PG_RETURN_BOOL(FALSE); - if ( box2.ymin > box2.ymax ) PG_RETURN_BOOL(FALSE); + if ( box2.ymin > box1.ymax ) PG_RETURN_BOOL(FALSE); } /*