From 3fa7a08cf99e0e4cc5e87f3946f358db5f95e88e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nicklas=20Av=C3=A9n?= Date: Sun, 18 Aug 2013 21:59:02 +0000 Subject: [PATCH] Fix wrong size-calculation when mixed types in aggregated twkb git-svn-id: http://svn.osgeo.org/postgis/trunk@11839 b70326c6-7e19-0410-871a-916f4a2858ee --- liblwgeom/lwout_twkb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/liblwgeom/lwout_twkb.c b/liblwgeom/lwout_twkb.c index af8a943fb..16a529ff6 100644 --- a/liblwgeom/lwout_twkb.c +++ b/liblwgeom/lwout_twkb.c @@ -93,7 +93,6 @@ static uint8_t lwgeom_twkb_type(const LWGEOM *geom, uint8_t variant) */ static inline int wkb_swap_bytes(uint8_t variant) { - LWDEBUGF(2, "Entered wkb_swap_bytes",0); /* If requested variant matches machine arch, we don't have to swap! */ if ( ((variant & WKB_NDR) && (getMachineEndian() == NDR)) || ((! (variant & WKB_NDR)) && (getMachineEndian() == XDR)) ) @@ -1272,7 +1271,7 @@ uint8_t* lwgeom_agg_to_twkb(const twkb_geom_arrays *lwgeom_arrays,uint8_t varian if(chk_homogenity==0) return NULL; if(chk_homogenity>1) - buf_size=6; + buf_size = 2+u_getvarint_size((unsigned long) chk_homogenity); else buf_size=1; -- 2.50.1