From 56a70b00c4092f5a8fee1a46c1620f43cc258348 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Tue, 3 Jun 2014 00:55:18 -0400 Subject: [PATCH] Context MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - No longer segfaults when ::initialize (argç, argv) is called with zero arguments, which is what the shell is doing. --- src/Context.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Context.cpp b/src/Context.cpp index 215ae44ff..b78866f3e 100644 --- a/src/Context.cpp +++ b/src/Context.cpp @@ -104,7 +104,7 @@ int Context::initialize (int argc, const char** argv) assumeLocations (); // Initialize the command line parser. - program = argv[0]; + program = (argc ? argv[0] : "task"); parser.initialize (argc, argv); // task arg0 arg1 ... // echo one two -- three | task zero --> task zero one two