[GRASS-SVN] r33579 - grass/trunk/lib/gis

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Sep 27 20:04:22 EDT 2008


Author: glynn
Date: 2008-09-27 20:04:22 -0400 (Sat, 27 Sep 2008)
New Revision: 33579

Modified:
   grass/trunk/lib/gis/parser.c
Log:
Disallow leading underscore in option names


Modified: grass/trunk/lib/gis/parser.c
===================================================================
--- grass/trunk/lib/gis/parser.c	2008-09-28 00:02:45 UTC (rev 33578)
+++ grass/trunk/lib/gis/parser.c	2008-09-28 00:04:22 UTC (rev 33579)
@@ -2128,7 +2128,7 @@
 {
     int n = strspn(string, "abcdefghijklmnopqrstuvwxyz0123456789_");
 
-    return n > 0 && string[n] == '=' && string[n-1] != '_';
+    return n > 0 && string[n] == '=' && string[0] != '_' && string[n-1] != '_';
 }
 
 static int set_option(char *string)



More information about the grass-commit mailing list