[geos-commits] r3904 - branches/3.4/include/geos/geom

svn_geos at osgeo.org svn_geos at osgeo.org
Wed Aug 21 06:44:23 PDT 2013


Author: strk
Date: 2013-08-21 06:44:22 -0700 (Wed, 21 Aug 2013)
New Revision: 3904

Modified:
   branches/3.4/include/geos/geom/BinaryOp.h
Log:
Use a double for PrecisionModel scale, avoiding overflows

Fixes #652

Modified: branches/3.4/include/geos/geom/BinaryOp.h
===================================================================
--- branches/3.4/include/geos/geom/BinaryOp.h	2013-08-21 11:14:44 UTC (rev 3903)
+++ branches/3.4/include/geos/geom/BinaryOp.h	2013-08-21 13:44:22 UTC (rev 3904)
@@ -456,14 +456,14 @@
               << std::endl;
 #endif
 
-		long unsigned int maxScale = 1e16;
+		double maxScale = 1e16;
 
     // Don't use a scale bigger than the input one
     if ( g0scale && g0scale < maxScale ) maxScale = g0scale;
     if ( g1scale && g1scale < maxScale ) maxScale = g1scale;
 
 
-		for (long unsigned int scale=maxScale; scale >= 1; scale /= 10)
+		for (double scale=maxScale; scale >= 1; scale /= 10)
 		{
 			PrecisionModel pm(scale);
 			GeometryFactory gf(&pm);



More information about the geos-commits mailing list