summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/getopt.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/getopt.c b/src/core/getopt.c
index b67da0c13..8a0fa2d08 100644
--- a/src/core/getopt.c
+++ b/src/core/getopt.c
@@ -239,6 +239,11 @@ int getopt_long ( int argc, char * const argv[], const char *optstring,
/* Check for long options */
if ( *(opttext++) == '-' ) {
+ /* "--" indicates end of options */
+ if ( *opttext == '\0' ) {
+ optind++;
+ return -1;
+ }
for ( longopt = longopts ; longopt->name ; longopt++ ) {
if ( ! match_long_option ( argc, argv, opttext,
longopt, &option ) )