From 60355ddcfb0ed9f0005e9a4bc6f7840bf9f19722 Mon Sep 17 00:00:00 2001 From: Paul Ramsey Date: Thu, 23 Aug 2018 14:42:21 +0000 Subject: [PATCH] Generate nan() explicitly with a zeroed out area, does this fix mix WKB generation of POINT EMPTY? References #4138 git-svn-id: http://svn.osgeo.org/postgis/trunk@16703 b70326c6-7e19-0410-871a-916f4a2858ee --- liblwgeom/lwout_wkb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/liblwgeom/lwout_wkb.c b/liblwgeom/lwout_wkb.c index 4cf4cd319..4742d6e03 100644 --- a/liblwgeom/lwout_wkb.c +++ b/liblwgeom/lwout_wkb.c @@ -330,7 +330,7 @@ static uint8_t* empty_to_wkb_buf(const LWGEOM *geom, uint8_t *buf, uint8_t varia if ( geom->type == POINTTYPE ) { const LWPOINT *pt = (LWPOINT*)geom; - static double nn = NAN; + double nn = nan("0"); int i; for ( i = 0; i < FLAGS_NDIMS(pt->point->flags); i++ ) { -- 2.40.0