Prechádzať zdrojové kódy

Fix bugs in previous commit

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@32598 15284696-431f-4ddb-bdfa-cd5b030d7da7
Glynn Clements 16 rokov pred
rodič
commit
d1a80ba623
1 zmenil súbory, kde vykonal 2 pridanie a 2 odobranie
  1. 2 2
      raster/r.colors/main.c

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

@@ -236,10 +236,10 @@ int main(int argc, char **argv)
     if (!cmap && !style && !rules && !remove)
     if (!cmap && !style && !rules && !remove)
 	G_fatal_error(_("One of \"-r\" or options \"color\", \"rast\" or \"rules\" must be specified!"));
 	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"));
 	G_fatal_error(_("\"color\", \"rules\", and \"raster\" options are mutually exclusive"));
 
 
-    interactive = strcmp(rules, "-") == 0;
+    interactive = rules && strcmp(rules, "-") == 0;
     if (interactive)
     if (interactive)
 	rules = NULL;
 	rules = NULL;