]> granicus.if.org Git - postgis/commitdiff
lwout_twkb.c: Address implicit type conversion with value change
authorRaúl Marín Rodríguez <rmrodriguez@carto.com>
Wed, 24 Apr 2019 11:03:39 +0000 (11:03 +0000)
committerRaúl Marín Rodríguez <rmrodriguez@carto.com>
Wed, 24 Apr 2019 11:03:39 +0000 (11:03 +0000)
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

git-svn-id: http://svn.osgeo.org/postgis/trunk@17413 b70326c6-7e19-0410-871a-916f4a2858ee

liblwgeom/lwout_twkb.c

index 1bf9ed46c9d32f1b0cf3ddeae0885b7c8525ead3..e406d8f6ea0646848c342e2fcac9f9d41b262c2e 100644 (file)
@@ -156,7 +156,7 @@ static int ptarray_to_twkb_buf(const POINTARRAY *pa, TWKB_GLOBALS *globals, TWKB
        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++ )