[GRASS-SVN] r62309 - grass-addons/grass7/raster/r.damflood
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Oct 20 18:34:02 PDT 2014
Author: annakrat
Date: 2014-10-20 18:34:01 -0700 (Mon, 20 Oct 2014)
New Revision: 62309
Modified:
grass-addons/grass7/raster/r.damflood/main.c
Log:
r.damflood: initialize variables to prevent segfaulting
Modified: grass-addons/grass7/raster/r.damflood/main.c
===================================================================
--- grass-addons/grass7/raster/r.damflood/main.c 2014-10-20 16:12:40 UTC (rev 62308)
+++ grass-addons/grass7/raster/r.damflood/main.c 2014-10-21 01:34:01 UTC (rev 62309)
@@ -447,6 +447,9 @@
V=input_V->answer;
G_warning("Initial velocity only along the north direction");
}
+
+ pp = 0;
+ ntimes = 0;
if (parm.opt_t->answer != NULL) {
for (i = 0; parm.opt_t->answers[i]; i++) ;
ntimes=i;
@@ -455,7 +458,6 @@
sscanf(parm.opt_t->answers[i], "%lf", &opt_t);
times[i]=opt_t;
}
- pp=0;
}
OUT_H=output_H->answer;
OUT_VEL=output_VEL->answer;
More information about the grass-commit
mailing list