summaryrefslogtreecommitdiffstats
path: root/Src/Zle/compctl.c
diff options
context:
space:
mode:
authorOliver Kiddle <opk@users.sourceforge.net>2004-02-15 12:55:30 +0000
committerOliver Kiddle <opk@users.sourceforge.net>2004-02-15 12:55:30 +0000
commit7feb529776649143927eefb7d70e81305327f67b (patch)
tree6a8d4e58161b7046e351c75402602d5560c6a87e /Src/Zle/compctl.c
parent19420: Update configure.ac for better Autconf 2.50 support. (diff)
downloadzsh-7feb529776649143927eefb7d70e81305327f67b.tar
zsh-7feb529776649143927eefb7d70e81305327f67b.tar.gz
zsh-7feb529776649143927eefb7d70e81305327f67b.tar.bz2
zsh-7feb529776649143927eefb7d70e81305327f67b.tar.lz
zsh-7feb529776649143927eefb7d70e81305327f67b.tar.xz
zsh-7feb529776649143927eefb7d70e81305327f67b.tar.zst
zsh-7feb529776649143927eefb7d70e81305327f67b.zip
19422: fix crash resulting from passing a long option to compctl
Diffstat (limited to 'Src/Zle/compctl.c')
-rw-r--r--Src/Zle/compctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Src/Zle/compctl.c b/Src/Zle/compctl.c
index 6e8fcb982..247f4c02d 100644
--- a/Src/Zle/compctl.c
+++ b/Src/Zle/compctl.c
@@ -857,7 +857,7 @@ get_compctl(char *name, char ***av, Compctl cc, int first, int isdef, int cl)
}
break;
default:
- if (!first && (**argv == '-' || **argv == '+'))
+ if (!first && (**argv == '-' || **argv == '+') && !argv[0][1])
(*argv)--, argv--, ready = 1;
else {
zwarnnam(name, "bad option: -%c", NULL, **argv);