From d8e4013c92c6504ccc44939bdb4da37b030795cc Mon Sep 17 00:00:00 2001 From: Joseph Rushton Wakeling Date: Fri, 22 Feb 2019 16:33:01 +0100 Subject: [PATCH] Fix runApplication handling of unrecognized command-line args `runApplication` takes an `args_out` parameter which, if non-null, is supposed to be set to match unrecognized command-line args. However, the parameter is never passed to `finalizeCommandLineOptions`, which will therefore log an error and throw an exception if any command line arguments are unrecognized. This patch fixes the oversight, ensuring that `runApplication` will correctly populate a non-null `args_out` parameter with unrecognized command-line arguments, and not throw an exception in this case. --- source/vibe/core/core.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/vibe/core/core.d b/source/vibe/core/core.d index da5066a..7274692 100644 --- a/source/vibe/core/core.d +++ b/source/vibe/core/core.d @@ -90,7 +90,7 @@ version (Windows) */ int runApplication(string[]* args_out = null) @safe { - try if (!() @trusted { return finalizeCommandLineOptions(); } () ) return 0; + try if (!() @trusted { return finalizeCommandLineOptions(args_out); } () ) return 0; catch (Exception e) { logDiagnostic("Error processing command line: %s", e.msg); return 1;