aboutsummaryrefslogtreecommitdiffstats
path: root/main/app.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/app.c')
-rw-r--r--main/app.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/main/app.c b/main/app.c
index d64a50373..fd3de0d9b 100644
--- a/main/app.c
+++ b/main/app.c
@@ -1410,8 +1410,11 @@ int ast_app_parse_options(const struct ast_app_option *options, struct ast_flags
} else if (argloc) {
args[argloc - 1] = NULL;
}
- if (!argloc || !ast_strlen_zero(args[argloc - 1]))
- ast_set_flag(flags, options[curarg].flag);
+ if (argloc && ast_strlen_zero(args[argloc - 1])) {
+ ast_log(LOG_WARNING, "Argument supplied for option '%c' was empty, option ignored.\n", curarg);
+ continue;
+ }
+ ast_set_flag(flags, options[curarg].flag);
}
return res;