about summary refs log tree commit diff
path: root/argp
diff options
context:
space:
mode:
Diffstat (limited to 'argp')
-rw-r--r--argp/argp-parse.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/argp/argp-parse.c b/argp/argp-parse.c
index 11c36be705..47a16fac4f 100644
--- a/argp/argp-parse.c
+++ b/argp/argp-parse.c
@@ -612,6 +612,10 @@ parser_finalize (struct parser *parser,
 
 	if (err == EBADKEY)
 	  err = 0;		/* Some parser didn't understand.  */
+
+	/* Tell the user that all arguments are parsed.  */
+	if (end_index)
+	  *end_index = parser->state.next;
       }
     else if (end_index)
       /* Return any remaining arguments to the user.  */