Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: core dump with arithmetic assignment
- X-seq: zsh-workers 8267
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: core dump with arithmetic assignment
- Date: Fri, 15 Oct 1999 08:30:59 +0200 (MET DST)
- In-reply-to: Adam Spiers's message of Thu, 14 Oct 1999 16:58:34 +0100
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Adam Spiers wrote:
> I haven't recompiled for quite a few patches now, so this may already
> be fixed.
>
> % (( 1 = 1 )) && echo hi
> zsh: lvalue required
> zsh: 11025 segmentation fault (core dumped) /bin/zsh
This at least avoids the SEGV and probably is even the correct fix. At
least it seems strange to first test for `if (!s)', print the error if
that is true and later try `setnparam(s, v)'. And returning the
value built after the `zerr()' seems ok, too. And `noeval' seems to be
used for something else.
Bye
Sven
--- oldsrc/math.c Thu Oct 14 16:26:25 1999
+++ Src/math.c Fri Oct 15 08:26:57 1999
@@ -467,6 +467,7 @@
zerr("lvalue required", NULL, 0);
v.type = MN_INTEGER;
v.u.l = 0;
+ return v;
}
if (noeval)
return v;
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author