[GRASS-SVN] r51545 - grass-addons/grass6/raster/r.xtent

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Apr 25 08:50:56 EDT 2012


Author: benducke
Date: 2012-04-25 05:50:56 -0700 (Wed, 25 Apr 2012)
New Revision: 51545

Modified:
   grass-addons/grass6/raster/r.xtent/main.c
Log:
Fixed a bug in conjunction with the "ruler=" option.

Modified: grass-addons/grass6/raster/r.xtent/main.c
===================================================================
--- grass-addons/grass6/raster/r.xtent/main.c	2012-04-25 12:43:16 UTC (rev 51544)
+++ grass-addons/grass6/raster/r.xtent/main.c	2012-04-25 12:50:56 UTC (rev 51545)
@@ -1101,17 +1101,17 @@
 			i ++;
 		}
 		/* now translate the category IDs to the sequential IDs in pmap */
-		for ( i=0; i <= num_centers; i ++ ) {
+		for ( i=0; i < num_centers; i ++ ) {
 			matched = 0;
-			for ( j=0; j <= num_centers; j ++ ) {
+			for ( j=0; j < num_centers; j ++ ) {
 				if ( cats[j] == ruler[i] ) {
 					ruler[i] = j;
 					matched = 1;
 				}
 			}
 			if ( matched == 0 ) {
-				G_fatal_error (_("Ruler ID '%i' in record no. %i in input map '%s' points to a non-existing record.\n"),
-									ruler[i], i, parm.output->answer );
+				G_fatal_error (_("Ruler ID in record no. %i in input map '%s' points to a non-existing record.\n"),
+									i+1, parm.centers->answer );
 			}
 		}
 	}



More information about the grass-commit mailing list