[postgis-tickets] r17413 - lwout_twkb.c: Address implicit type conversion with value change

Raul raul at rmr.ninja
Wed Apr 24 04:03:39 PDT 2019


Author: algunenano
Date: 2019-04-24 04:03:39 -0700 (Wed, 24 Apr 2019)
New Revision: 17413

Modified:
   trunk/liblwgeom/lwout_twkb.c
Log:
lwout_twkb.c: Address implicit type conversion with value change

lwout_twkb.c:170:9: runtime error: implicit conversion from type 'long long' of value 10000000000 (64-bit, signed) to type 'int' changed the value to 1410065408 (32-bit, signed)

References #4383



Modified: trunk/liblwgeom/lwout_twkb.c
===================================================================
--- trunk/liblwgeom/lwout_twkb.c	2019-04-24 11:02:21 UTC (rev 17412)
+++ trunk/liblwgeom/lwout_twkb.c	2019-04-24 11:03:39 UTC (rev 17413)
@@ -156,7 +156,7 @@
 	for ( i = 0; i < pa->npoints; i++ )
 	{
 		double *dbl_ptr = (double*)getPoint_internal(pa, i);
-		int diff = 0;
+		int64_t diff = 0;
 
 		/* Write this coordinate to the buffer as a varint */
 		for ( j = 0; j < ndims; j++ )



More information about the postgis-tickets mailing list