1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-01-11 08:21:13 +01:00

17497: getopts skipped over zero-length arguments.

This commit is contained in:
Peter Stephenson 2002-08-01 15:50:07 +00:00
parent 8e90d2018c
commit cc70b96162
2 changed files with 9 additions and 0 deletions

View file

@ -1,3 +1,10 @@
2002-08-01 Peter Stephenson <pws@csr.com>
* 17497: Src/builtin.c: getopts skipped over zero-length arguments.
* Dan Nelson: 17492: Src/builtin.c, Src/cond.c, Src/exec.c:
Quote output from xtrace.
2002-08-01 Oliver Kiddle <opk@zsh.org>
* 17496: Completion/Unix/Type/_diff_options: update for new options

View file

@ -3518,6 +3518,8 @@ bin_getopts(char *name, char **argv, char *ops, int func)
/* find place in relevant argument */
str = unmetafy(dupstring(args[zoptind - 1]), &lenstr);
if (!lenstr) /* Definitely not an option. */
return 1;
if(optcind >= lenstr) {
optcind = 0;
if(!args[zoptind++])