From 122913b904f1ea6f2bae82553776a8016d1204d3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nicklas=20Av=C3=A9n?= Date: Tue, 30 Sep 2014 04:16:10 +0000 Subject: [PATCH] This should repair the build but the emty geometry twkb is still corrupt git-svn-id: http://svn.osgeo.org/postgis/trunk@13009 b70326c6-7e19-0410-871a-916f4a2858ee --- liblwgeom/lwout_twkb.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/liblwgeom/lwout_twkb.c b/liblwgeom/lwout_twkb.c index 86ef8cd31..998335c2c 100644 --- a/liblwgeom/lwout_twkb.c +++ b/liblwgeom/lwout_twkb.c @@ -107,7 +107,7 @@ static int uint8_to_twkb_buf(const uint8_t ival, uint8_t **buf) static size_t empty_to_twkb_size(const LWGEOM *geom, uint8_t variant, int64_t id) { LWDEBUGF(2, "Entered empty_to_twkb_size",0); - size_t size=0; + size_t size = WKB_BYTE_SIZE + WKB_BYTE_SIZE; /*size of ID*/ size += varint_s64_encoded_size((int64_t) id); /*size of npoints*/ @@ -128,6 +128,11 @@ static int empty_to_twkb_buf(const LWGEOM *geom, uint8_t **buf, uint8_t variant, } uint8_t flag=0; + /* Set the id flag */ + FIRST_BYTE_SET_ID(flag, ((variant & TWKB_ID) ? 1 : 0)); + /* Tell what precision to use*/ + FIRST_BYTE_SET_PRECISION(flag,0); + /*Copy the flag to the buffer*/ uint8_to_twkb_buf(flag,buf); -- 2.50.1