From d8351d93baae4eed0ab8bd90c408fde0ca039a4b Mon Sep 17 00:00:00 2001 From: Tim Felgentreff Date: Wed, 15 Dec 2021 21:01:39 +0100 Subject: [PATCH] fix help message for wargus tool --- gameheaders/stratagus-game-launcher.h | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/gameheaders/stratagus-game-launcher.h b/gameheaders/stratagus-game-launcher.h index 345407342..f2b4a1cf4 100644 --- a/gameheaders/stratagus-game-launcher.h +++ b/gameheaders/stratagus-game-launcher.h @@ -682,15 +682,13 @@ int main(int argc, char * argv[]) { SetUserDataPath(data_path); ExtractData(extractor_path, extractor_args, data_path, scripts_path, 1); return 0; - } - } - if (argc > 1) { - printf("Usage: %s [path to extraction file|--extract|--extract-no-gui]\n" - "\tpath to extraction file - will be used as file to start the extraction process on\n" - "\t--extract - force extraction even if data is already extracted\n" - "\t--extract-no-gui - force extraction even if data is already extracted, using the console only for prompts\n", - argv[0]); - return -1; + } else if (!strcmp(argv[1], "--help") || !strcmp(argv[1], "-h")) { + printf("Usage: %s [path to extraction file|--extract|--extract-no-gui]\n" + "\tpath to extraction file - will be used as file to start the extraction process on\n" + "\t--extract - force extraction even if data is already extracted\n" + "\t--extract-no-gui - force extraction even if data is already extracted, using the console only for prompts\n\n", + argv[0]); + } } if ( stat(stratagus_bin, &st) != 0 ) {