summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/internal/argv/argv.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/internal/argv/argv.h b/src/internal/argv/argv.h
index 0cb3c40..9f570ed 100644
--- a/src/internal/argv/argv.h
+++ b/src/internal/argv/argv.h
@@ -571,7 +571,13 @@ static struct argv_meta * argv_get(
argv_scan(meta->argv,options,&ctx,meta);
if (ctx.errcode != ARGV_ERROR_OK) {
+ if (!ctx.program)
+ ctx.program = argv[0];
+
+ ctx.errcode = ARGV_ERROR_INTERNAL;
+ argv_show_error(&ctx);
argv_free(meta);
+
return 0;
}