[GRASS-SVN] r37021 - grass/branches/develbranch_6/raster/r.recode

svn_grass at osgeo.org svn_grass at osgeo.org
Wed May 6 08:07:26 EDT 2009


Author: hamish
Date: 2009-05-06 08:07:26 -0400 (Wed, 06 May 2009)
New Revision: 37021

Modified:
   grass/branches/develbranch_6/raster/r.recode/read_rules.c
Log:
fix for last commit

Modified: grass/branches/develbranch_6/raster/r.recode/read_rules.c
===================================================================
--- grass/branches/develbranch_6/raster/r.recode/read_rules.c	2009-05-06 11:54:45 UTC (rev 37020)
+++ grass/branches/develbranch_6/raster/r.recode/read_rules.c	2009-05-06 12:07:26 UTC (rev 37021)
@@ -66,9 +66,12 @@
     for (line = 1;; line++) {
 	if (isatty(fileno(fp)))
 	    fprintf(stderr, "> ");
+
 	if (!G_getl2(buf, 1024, fp))
 	    return nrules;
-	buf[strlen(buf) - 1] = '\0';
+
+	G_debug(5, "buf = [%s], strlen(buf)=%d", buf, strlen(buf));
+
 	for (n = 0; buf[n]; n++)
 	    if (buf[n] == ',')
 		buf[n] = ' ';



More information about the grass-commit mailing list