* ((...)) fix
@ 1996-11-24 0:03 Zoltan Hidvegi
0 siblings, 0 replies; only message in thread
From: Zoltan Hidvegi @ 1996-11-24 0:03 UTC (permalink / raw)
To: Zsh hacking and development
There are two problems with the rewritten ((...)): it dumps core on (())
and it substitutes its body twice.
Zoltan
*** exec.c 1996/11/17 01:57:26 3.1.0.2
--- exec.c 1996/11/23 23:34:17 3.1.0.3
***************
*** 2356,2370 ****
int
execarith(Cmd cmd)
{
! char *e = (char *) getdata(firstnode(cmd->args));
! int val;
! singsub(&e);
! if (errflag)
! return 1;
! val = matheval(e);
errflag = 0;
! return(!val);
}
/* perform time ... command */
--- 2356,2368 ----
int
execarith(Cmd cmd)
{
! char *e;
! long val = 0;
! while ((e = (char *) ugetnode(cmd->args)))
! val = matheval(e);
errflag = 0;
! return !val;
}
/* perform time ... command */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1996-11-24 1:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-11-24 0:03 ((...)) fix Zoltan Hidvegi
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).