Browse Source

r.series: allow weight = 0

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@72789 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz 7 years ago
parent
commit
8a7fe86047
1 changed files with 2 additions and 2 deletions
  1. 2 2
      raster/r.series/main.c

+ 2 - 2
raster/r.series/main.c

@@ -246,7 +246,7 @@ int main(int argc, char *argv[])
             if (ntokens > 1) {
 	        weight = atof(G_chop(tokens[1]));
 
-		if (weight <= 0)
+		if (weight < 0)
 		    G_fatal_error(_("Weights must be positive"));
 
 		if (weight != 1)
@@ -308,7 +308,7 @@ int main(int argc, char *argv[])
             if (num_weights) {
                 p->weight = (DCELL)atof(parm.weights->answers[i]);
 
-		if (p->weight <= 0)
+		if (p->weight < 0)
 		    G_fatal_error(_("Weights must be positive"));
 
 		if (p->weight != 1)