[GRASS-SVN] r32598 - grass/trunk/raster/r.colors
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Aug 6 22:02:44 EDT 2008
Author: glynn
Date: 2008-08-06 22:02:44 -0400 (Wed, 06 Aug 2008)
New Revision: 32598
Modified:
grass/trunk/raster/r.colors/main.c
Log:
Fix bugs in previous commit
Modified: grass/trunk/raster/r.colors/main.c
===================================================================
--- grass/trunk/raster/r.colors/main.c 2008-08-07 02:01:34 UTC (rev 32597)
+++ grass/trunk/raster/r.colors/main.c 2008-08-07 02:02:44 UTC (rev 32598)
@@ -236,10 +236,10 @@
if (!cmap && !style && !rules && !remove)
G_fatal_error(_("One of \"-r\" or options \"color\", \"rast\" or \"rules\" must be specified!"));
- if (!!style + !!cmap + !!rules != 1)
+ if (!!style + !!cmap + !!rules > 1)
G_fatal_error(_("\"color\", \"rules\", and \"raster\" options are mutually exclusive"));
- interactive = strcmp(rules, "-") == 0;
+ interactive = rules && strcmp(rules, "-") == 0;
if (interactive)
rules = NULL;
More information about the grass-commit
mailing list