[GRASS-SVN] r66379 - grass/trunk/vector/v.random
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Sep 29 18:07:13 PDT 2015
Author: wenzeslaus
Date: 2015-09-29 18:07:13 -0700 (Tue, 29 Sep 2015)
New Revision: 66379
Modified:
grass/trunk/vector/v.random/main.c
Log:
v.random: use unsigned long and strtoul for number of points
Modified: grass/trunk/vector/v.random/main.c
===================================================================
--- grass/trunk/vector/v.random/main.c 2015-09-29 13:44:37 UTC (rev 66378)
+++ grass/trunk/vector/v.random/main.c 2015-09-30 01:07:13 UTC (rev 66379)
@@ -64,7 +64,8 @@
double (*rng)(void) = G_drand48;
double zmin, zmax;
int seed;
- int i, j, k, n, type, usefloat;
+ unsigned long i, n;
+ int j, k, type, usefloat;
int area, nareas, field;
struct boxlist *List = NULL;
BOX_SIZE *size_list = NULL;
@@ -179,8 +180,8 @@
exit(EXIT_FAILURE);
output = parm.output->answer;
- n = atoi(parm.nsites->answer);
-
+ n = strtoul(parm.nsites->answer, NULL, 10);
+
if(parm.seed->answer)
seed = atoi(parm.seed->answer);
More information about the grass-commit
mailing list