From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21286 invoked from network); 15 Oct 1999 06:31:09 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 15 Oct 1999 06:31:09 -0000 Received: (qmail 5682 invoked by alias); 15 Oct 1999 06:31:01 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8267 Received: (qmail 5675 invoked from network); 15 Oct 1999 06:31:00 -0000 Date: Fri, 15 Oct 1999 08:30:59 +0200 (MET DST) Message-Id: <199910150630.IAA17182@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Adam Spiers's message of Thu, 14 Oct 1999 16:58:34 +0100 Subject: Re: core dump with arithmetic assignment 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@informatik.hu-berlin.de