소스 검색

Fixed bug in parser introduced with https://trac.osgeo.org/grass/changeset/73525

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@73561 15284696-431f-4ddb-bdfa-cd5b030d7da7
Soeren Gebbert 6 년 전
부모
커밋
7c562cc252
1개의 변경된 파일5개의 추가작업 그리고 5개의 파일을 삭제
  1. 5 5
      lib/gis/parser.c

+ 5 - 5
lib/gis/parser.c

@@ -508,6 +508,11 @@ int G_parser(int argc, char **argv)
 	while (--argc) {
 	    ptr = *(++argv);
 
+	    /* JSON print option */
+	    if (strcmp(ptr, "--json") == 0) {
+		print_json = 1;
+	    }
+
 	    if (strcmp(ptr, "help") == 0 || strcmp(ptr, "--h") == 0 ||
 		strcmp(ptr, "-help") == 0 || strcmp(ptr, "--help") == 0) {
 		G_usage();
@@ -519,11 +524,6 @@ int G_parser(int argc, char **argv)
 		st->overwrite = 1;
 	    }
 
-	    /* JSON print option */
-	    if (strcmp(ptr, "--json") == 0) {
-		print_json = 1;
-	    }
-
 	    /* Verbose option */
 	    else if (strcmp(ptr, "--v") == 0 || strcmp(ptr, "--verbose") == 0) {
 		char buff[32];