diff options
Diffstat (limited to 'Src/Zle/compcore.c')
-rw-r--r-- | Src/Zle/compcore.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Src/Zle/compcore.c b/Src/Zle/compcore.c index 52b0c173f..c3b971e0d 100644 --- a/Src/Zle/compcore.c +++ b/Src/Zle/compcore.c @@ -1901,7 +1901,8 @@ set_comp_sep(void) p = compwords[i] = (char *) getdata(n); untokenize(p); } - compcurrent = cur + 1; + /* The current position shouldn't exceed the new word count */ + compcurrent = cur + 1 > i ? i : cur + 1; compwords[i] = NULL; } instring = ois; |