[GRASS-SVN] r71281 - grass/trunk/raster/r.viewshed
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Jul 18 06:58:52 PDT 2017
Author: mmetz
Date: 2017-07-18 06:58:52 -0700 (Tue, 18 Jul 2017)
New Revision: 71281
Modified:
grass/trunk/raster/r.viewshed/viewshed.cpp
Log:
r.viewshed: fix maxsizet (size_t is unisgned)
Modified: grass/trunk/raster/r.viewshed/viewshed.cpp
===================================================================
--- grass/trunk/raster/r.viewshed/viewshed.cpp 2017-07-18 13:22:29 UTC (rev 71280)
+++ grass/trunk/raster/r.viewshed/viewshed.cpp 2017-07-18 13:58:52 UTC (rev 71281)
@@ -151,9 +151,9 @@
}
else {
/* this is the max value of size_t */
- long long maxsizet = ((long long)1 << (sizeof(size_t) * 8 - 2)) - 1;
+ long long maxsizet = ((long long)1 << (sizeof(size_t) * 8 - 1)) - 1;
- maxsizet += ((long long)1 << (sizeof(size_t) * 8 - 2));
+ maxsizet += ((long long)1 << (sizeof(size_t) * 8 - 1));
G_debug(1, "max size_t is %lld", maxsizet);
More information about the grass-commit
mailing list