diff options
-rw-r--r-- | src/expr.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/expr.c b/src/expr.c index 8702dd19c..31966629b 100644 --- a/src/expr.c +++ b/src/expr.c @@ -165,6 +165,13 @@ main (int argc, char **argv) if (!posixly_correct) parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION, AUTHORS, usage); + /* The above handles --help and --version. + Since there is no other invocation of getopt, handle `--' here. */ + if (argc > 1 && STREQ (argv[1], "--")) + { + --argc; + ++argv; + } if (argc == 1) { |