summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libshouldbeinlibc/argp-parse.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libshouldbeinlibc/argp-parse.c b/libshouldbeinlibc/argp-parse.c
index 58e5576c..a80f9871 100644
--- a/libshouldbeinlibc/argp-parse.c
+++ b/libshouldbeinlibc/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. */