summaryrefslogtreecommitdiff
path: root/Src/Zle/complete.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/Zle/complete.c')
-rw-r--r--Src/Zle/complete.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Src/Zle/complete.c b/Src/Zle/complete.c
index 5c166291e..574e638ac 100644
--- a/Src/Zle/complete.c
+++ b/Src/Zle/complete.c
@@ -403,7 +403,7 @@ parse_class(Cpattern p, unsigned char *s, unsigned char e)
n = !n;
while (*s && (k || *s != e)) {
- if (s[1] == '-' && s[2] != e) {
+ if (s[1] == '-' && s[2] && s[2] != e) {
/* a run of characters */
for (j = (int) *s; j <= (int) s[2]; j++)
p->tab[j] = (eq ? i++ : n);