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

* Re: PATCH: crash with weird completer
  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
  0 siblings, 1 reply; 4+ messages in thread
From: Bart Schaefer @ 2022-03-29 21:56 UTC (permalink / raw)
  To: Mikael Magnusson; +Cc: Zsh hackers list

On Tue, Mar 29, 2022 at 9:14 AM Mikael Magnusson <mikachu@gmail.com> wrote:
>
> I'm just resubmitting it without the RFC tag, lest anyone be
> surprised when I commit it later.

Did we decide this was preferable to my tweak suggested in 49818?


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

* Re: PATCH: crash with weird completer
  2022-03-29 21:56 ` Bart Schaefer
@ 2022-03-30  5:17   ` Mikael Magnusson
  2022-03-30  5:23     ` Bart Schaefer
  0 siblings, 1 reply; 4+ messages in thread
From: Mikael Magnusson @ 2022-03-30  5:17 UTC (permalink / raw)
  To: Bart Schaefer; +Cc: Zsh hackers list

This is your tweak, I just reformatted it a bit, which you didn't
object to at the time.

On 3/29/22, Bart Schaefer <schaefer@brasslantern.com> wrote:
> On Tue, Mar 29, 2022 at 9:14 AM Mikael Magnusson <mikachu@gmail.com> wrote:
>>
>> I'm just resubmitting it without the RFC tag, lest anyone be
>> surprised when I commit it later.
>
> Did we decide this was preferable to my tweak suggested in 49818?
>


-- 
Mikael Magnusson


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

* Re: PATCH: crash with weird completer
  2022-03-30  5:17   ` Mikael Magnusson
@ 2022-03-30  5:23     ` Bart Schaefer
  0 siblings, 0 replies; 4+ messages in thread
From: Bart Schaefer @ 2022-03-30  5:23 UTC (permalink / raw)
  To: Mikael Magnusson; +Cc: Zsh hackers list

[-- Attachment #1: Type: text/plain, Size: 229 bytes --]

On Tue, Mar 29, 2022, 10:17 PM Mikael Magnusson <mikachu@gmail.com> wrote:

> This is your tweak, I just reformatted it a bit, which you didn't
> object to at the time.
>

Ah, indeed.  I just didn't read closely enough.  Thanks.

[-- Attachment #2: Type: text/html, Size: 555 bytes --]

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