Ver Fonte

* Allow -3 to be ran before binary is initialized

Bryan Drewery há 17 anos atrás
pai
commit
e7b07a2fa6
1 ficheiros alterados com 6 adições e 3 exclusões
  1. 6 3
      src/main.c

+ 6 - 3
src/main.c

@@ -344,9 +344,6 @@ static void dtx_arg(int& argc, char *argv[])
         exit(0);
       case '2':		/* used for testing new binary through update */
         exit(2);
-      case '3':		/* return the size of our settings struct */
-        printf("%d %zu\n", SETTINGS_VER, sizeof(settings_t));
-        exit(0);
       case '4':
         readconf(optarg, CONF_ENC);
         expand_tilde(&conf.binpath);
@@ -767,6 +764,12 @@ printf("out: %s\n", out);
     exit(5);				/* not initialized */
   }
 
+  /* return the size of our settings struct */
+  if (argc == 2 && !strcmp(argv[1], STR("-3"))) {
+    printf("%d %zu\n", SETTINGS_VER, sizeof(settings_t));
+    exit(0);
+  }
+
   {
     bool read_stdin = 0;
     if (argc == 2 && !strcmp(argv[1], STR("-Q")))