From 0e17ad98def5abb90b274921fb57a35ee980b564 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Mon, 27 Jan 2014 17:03:19 +0100 Subject: [PATCH] Opt: Fix bug introduced by my cleanups --- ucw/opt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ucw/opt.c b/ucw/opt.c index 01c66038..4cddc621 100644 --- a/ucw/opt.c +++ b/ucw/opt.c @@ -514,7 +514,7 @@ static void opt_check_required(struct opt_context *oc) if (!opt->count && (opt->flags & OPT_REQUIRED)) { struct opt_item *item = opt->item; if (item->letter > OPT_POSITIONAL_TAIL) - opt_failure("Required positional argument #%d not found.", i - OPT_POSITIONAL_TAIL); + opt_failure("Required positional argument #%d not found.", item->letter - OPT_POSITIONAL_TAIL); else if (item->letter == OPT_POSITIONAL_TAIL) opt_failure("Required positional argument not found."); else if (item->letter && item->name) -- 2.39.2