1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-04 10:41:11 +02:00

50042: Another fix for 49915

If the last element in the list is a duplicate, we would walk off the end
This commit is contained in:
Mikael Magnusson 2022-04-11 23:26:57 +02:00
parent 35ff1e271a
commit 1039b09c0c
2 changed files with 5 additions and 1 deletions

View file

@ -1,3 +1,7 @@
2022-04-11 Mikael Magnusson <mikachu@gmail.com>
* 50042: Src/Zle/compcore.c: Another fix for 49915
2022-04-10 Daniel Shahaf <d.s@daniel.shahaf.name>
* unposted: NEWS: Improve flow between the paragraph and

View file

@ -3314,7 +3314,7 @@ makearray(LinkList l, int type, int flags, int *np, int *nlp, int *llp)
if (del) {
int n_orig = n;
for (bp = rp, ap = rp; bp < rp + n_orig; ap++, bp++) {
while (bp[0]->flags & CMF_DELETE) {
while (bp < rp + n_orig && (bp[0]->flags & CMF_DELETE)) {
bp++;
n--;
}