zsh-workers
 help / color / mirror / code / Atom feed
* Re: PATCH: crash with weird completer
@ 2022-03-29 16:11 Mikael Magnusson
  2022-03-29 21:56 ` Bart Schaefer
  0 siblings, 1 reply; 4+ messages in thread
From: Mikael Magnusson @ 2022-03-29 16:11 UTC (permalink / raw)
  To: Zsh hackers list

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-03-30  5:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-29 16:11 PATCH: crash with weird completer Mikael Magnusson
2022-03-29 21:56 ` Bart Schaefer
2022-03-30  5:17   ` Mikael Magnusson
2022-03-30  5:23     ` Bart Schaefer

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).