[postgis-tickets] r15837 - increase possible size of varint

nicklas.aven at jordogskog.no nicklas.aven at jordogskog.no
Tue Sep 26 12:10:51 PDT 2017


Author: nicklas
Date: 2017-09-26 12:10:50 -0700 (Tue, 26 Sep 2017)
New Revision: 15837

Modified:
   branches/2.3/liblwgeom/bytebuffer.c
Log:
increase possible size of varint

Modified: branches/2.3/liblwgeom/bytebuffer.c
===================================================================
--- branches/2.3/liblwgeom/bytebuffer.c	2017-09-26 19:10:15 UTC (rev 15836)
+++ branches/2.3/liblwgeom/bytebuffer.c	2017-09-26 19:10:50 UTC (rev 15837)
@@ -187,7 +187,7 @@
 bytebuffer_append_varint(bytebuffer_t *b, const int64_t val)
 {	
 	size_t size;
-	bytebuffer_makeroom(b, 8);
+	bytebuffer_makeroom(b, 16);
 	size = varint_s64_encode_buf(val, b->writecursor);
 	b->writecursor += size;
 	return;
@@ -200,7 +200,7 @@
 bytebuffer_append_uvarint(bytebuffer_t *b, const uint64_t val)
 {	
 	size_t size;
-	bytebuffer_makeroom(b, 8);
+	bytebuffer_makeroom(b, 16);
 	size = varint_u64_encode_buf(val, b->writecursor);
 	b->writecursor += size;
 	return;



More information about the postgis-tickets mailing list