From 4d470e7e07d04646ad90d14e62a78b4436cf25ea Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Thu, 6 Aug 2015 17:16:12 +0200 Subject: [PATCH] Show help when encountering an unknown argument on the command line. --- src/main.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index c5e9ba8..951725a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -146,6 +146,8 @@ int main(int argc, char *argv[]) else if (strcmp(argv[i], "-randomscreens") == 0) graphics.takeRandomScreenShots = true; else if (strcmp(argv[i], "-nomonsters") == 0) engine.devNoMonsters = true; #endif + + else {fprintf(stderr, "Unknown argument '%s'\n", argv[i]); showHelp();} } switch (recordMode) -- 2.39.5