From: Mikael Magnusson <mikachu@gmail.com>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: PATCH: crash with weird completer
Date: Tue, 29 Mar 2022 18:11:38 +0200 [thread overview]
Message-ID: <CAHYJk3SSQFYx8ZNebVe9nzxLALO_ebeX78x27wmTWzjCWw5_SA@mail.gmail.com> (raw)
On 3/10/22, Mikael Magnusson <mikachu@gmail.com> wrote:
>
> diff --git a/Src/Zle/compresult.c b/Src/Zle/compresult.c
> index 8b5955819a..0fed297b56 100644
> --- a/Src/Zle/compresult.c
> +++ b/Src/Zle/compresult.c
> @@ -612,9 +612,10 @@ instmatch(Cmatch m, int *scs)
> int pcs = zlemetacs;
>
> l = 0;
> - for (bp = brbeg, brpos = m->brpl,
> - bradd = (m->pre ? strlen(m->pre) : 0);
> - bp; bp = bp->next, brpos++) {
> + bradd = (m->pre ? strlen(m->pre) : 0);
> + for (bp = brbeg, brpos = m->brpl;
> + bp && brpos;
> + bp = bp->next, brpos++) {
> zlemetacs = a + *brpos + bradd;
> pcs = zlemetacs;
> l = strlen(bp->str);
I haven't noticed any extra problems as a result of using this patch,
so I'm just resubmitting it without the RFC tag, lest anyone be
surprised when I commit it later.
--
Mikael Magnusson
next reply other threads:[~2022-03-29 16:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-29 16:11 Mikael Magnusson [this message]
2022-03-29 21:56 ` Bart Schaefer
2022-03-30 5:17 ` Mikael Magnusson
2022-03-30 5:23 ` Bart Schaefer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAHYJk3SSQFYx8ZNebVe9nzxLALO_ebeX78x27wmTWzjCWw5_SA@mail.gmail.com \
--to=mikachu@gmail.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).