瀏覽代碼

Fix bugs in previous commit

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@32598 15284696-431f-4ddb-bdfa-cd5b030d7da7
Glynn Clements 16 年之前
父節點
當前提交
d1a80ba623
共有 1 個文件被更改,包括 2 次插入2 次删除
  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)
 	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;