From 3f77c307a83545d6374366fbe3a54674acf8a19c Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Fri, 9 May 1997 19:58:01 +0000 Subject: (parser_finalize): Always set *END_INDEX if supplied. --- libshouldbeinlibc/argp-parse.c | 4 ++++ 1 file changed, 4 insertions(+) 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. */ -- cgit v1.2.3