Commit d3ea9ee4 authored by Jiří Klimeš's avatar Jiří Klimeš
Browse files

cli: handle NULL gracefully in nmc_arg_is_help()

parent 4950abfb
......@@ -60,6 +60,8 @@ next_arg (int *argc, char ***argv)
gboolean
nmc_arg_is_help (const char *arg)
{
if (!arg)
return FALSE;
if ( matches (arg, "help") == 0
|| (g_str_has_prefix (arg, "-") && matches (arg+1, "help") == 0)
|| (g_str_has_prefix (arg, "--") && matches (arg+2, "help") == 0)) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment