From: Raúl Marín Rodríguez Date: Tue, 2 Jul 2019 09:00:14 +0000 (+0000) Subject: Fix bug in lwgeom_le X-Git-Tag: 2.5.3~18 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=34cb1b2c11e06e901a9c29b854aea9a7e197c704;p=postgis Fix bug in lwgeom_le References #4445 git-svn-id: http://svn.osgeo.org/postgis/branches/2.5@17579 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/NEWS b/NEWS index 9733d51af..fde13ec94 100644 --- a/NEWS +++ b/NEWS @@ -11,6 +11,7 @@ PostGIS 2.5.3 - #4327, Avoid pfree'ing the result of getenv (Raúl Marín) - #4406, Throw on invalid characters when decoding geohash (Raúl Marín) - #4440, Internal type lookups fail over FDW (Paul Ramsey) + - #4445, Fix bug in lwgeom_le (Raúl Marín) PostGIS 2.5.2 diff --git a/postgis/lwgeom_btree.c b/postgis/lwgeom_btree.c index c704364de..95776a579 100644 --- a/postgis/lwgeom_btree.c +++ b/postgis/lwgeom_btree.c @@ -69,7 +69,7 @@ Datum lwgeom_le(PG_FUNCTION_ARGS) int cmp = gserialized_cmp(g1, g2); PG_FREE_IF_COPY(g1, 0); PG_FREE_IF_COPY(g2, 1); - if (cmp == 0) + if (cmp <= 0) PG_RETURN_BOOL(true); else PG_RETURN_BOOL(false);