diff options
author | Barton E. Schaefer <schaefer@zsh.org> | 2017-04-15 21:16:11 -0700 |
---|---|---|
committer | Barton E. Schaefer <schaefer@zsh.org> | 2017-04-15 21:16:11 -0700 |
commit | fc96274801f38f20063c904e0eaa98a23ee2e74c (patch) | |
tree | b65bee3f12ec0f42a63fb0a14234922c1705da62 /Src/init.c | |
parent | a11b241d4a5ec7ee1009905372cf32fb4538fbb3 (diff) | |
download | zsh-fc96274801f38f20063c904e0eaa98a23ee2e74c.tar.gz zsh-fc96274801f38f20063c904e0eaa98a23ee2e74c.tar.xz zsh-fc96274801f38f20063c904e0eaa98a23ee2e74c.zip |
40977: "emulate" disallows "--help" and "--version"
Diffstat (limited to 'Src/init.c')
-rw-r--r-- | Src/init.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Src/init.c b/Src/init.c index a1162b318..d8c26aca2 100644 --- a/Src/init.c +++ b/Src/init.c @@ -376,12 +376,12 @@ parseopts(char *nam, char ***argvp, char *new_opts, char **cmdp, *argv = "--"; while (*++*argv) { if (**argv == '-') { - if(!argv[0][1]) { + if (!argv[0][1]) { /* The pseudo-option `--' signifies the end of options. */ argv++; goto doneoptions; } - if(*argv != args+1 || **argv != '-') + if (nam || *argv != args+1 || **argv != '-') goto badoptionstring; /* GNU-style long options */ ++*argv; |