1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-29 05:21:00 +01:00

40977: "emulate" disallows "--help" and "--version"

This commit is contained in:
Barton E. Schaefer 2017-04-15 21:16:11 -07:00
parent a11b241d4a
commit fc96274801
2 changed files with 6 additions and 2 deletions

View file

@ -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;