From 4b948f31073db36f62c79ac9be84ca35465d1c1e Mon Sep 17 00:00:00 2001 From: Paul Ramsey Date: Fri, 6 Oct 2017 13:20:05 +0000 Subject: [PATCH] geohash_point_as_int: Fix undefined behaviour in shift operation References #3875 git-svn-id: http://svn.osgeo.org/postgis/trunk@15918 b70326c6-7e19-0410-871a-916f4a2858ee --- liblwgeom/lwalgorithm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/liblwgeom/lwalgorithm.c b/liblwgeom/lwalgorithm.c index 69b818a78..27096e80d 100644 --- a/liblwgeom/lwalgorithm.c +++ b/liblwgeom/lwalgorithm.c @@ -666,7 +666,7 @@ unsigned int geohash_point_as_int(POINT2D *pt) mid = (lon[0] + lon[1]) / 2; if (longitude > mid) { - ch |= 0x0001 << bit; + ch |= 0x0001u << bit; lon[0] = mid; } else -- 2.40.0