Fix app bug, update skel example, add skel to makefile as option (bug #3869)
[asterisk/asterisk.git] / app.c
diff --git a/app.c b/app.c
index 0ea51f8..9d70e53 100755 (executable)
--- a/app.c
+++ b/app.c
@@ -1489,7 +1489,8 @@ int ast_parseoptions(const struct ast_option *options, struct ast_flags *flags,
                                ast_log(LOG_WARNING, "Missing closing parenthesis for argument '%c'\n", curarg);
                                res = -1;
                        }
                                ast_log(LOG_WARNING, "Missing closing parenthesis for argument '%c'\n", curarg);
                                res = -1;
                        }
-               }
+               } else if (argloc)
+                       args[argloc - 1] = NULL;
        }
        return res;
 }
        }
        return res;
 }