From 72cb7cfc6fff21d3fb9b3f1aa384ce4b17a4e8c0 Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Thu, 19 May 2011 16:10:46 +0000 Subject: 29307, 29308 + replies: Fix some doubled words in docs and comments. --- Src/math.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Src/math.c') diff --git a/Src/math.c b/Src/math.c index caff06de9..377d1ac9c 100644 --- a/Src/math.c +++ b/Src/math.c @@ -46,7 +46,7 @@ mod_export mnumber zero_mnumber; /* * The last value we computed: note this isn't cleared - * until the next computation, unlike unlike yyval. + * until the next computation, unlike yyval. * Everything else is saved and returned to allow recursive calls. */ /**/ -- cgit v1.2.3 From bd2d0636d26c78487e6abc364a116d37a450bf29 Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Fri, 27 May 2011 01:42:30 +0000 Subject: 29329: fix undefined behaviour in math.c --- ChangeLog | 5 ++++- Src/math.c | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'Src/math.c') diff --git a/ChangeLog b/ChangeLog index 55fdd95eb..f390032d5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -11,6 +11,9 @@ * unposted: Doc/Zsh/params.yo: Document that PROMPT_EOL_MARK can be empty, forgot in 28480. + * 29329: Src/math.c: Fix undefined behaviour in function argument + evaluation order. + 2011-05-26 Peter Stephenson * unposted: Etc/CONTRIBUTORS: expand. @@ -14840,5 +14843,5 @@ ***************************************************** * This is used by the shell to define $ZSH_PATCHLEVEL -* $Revision: 1.5335 $ +* $Revision: 1.5336 $ ***************************************************** diff --git a/Src/math.c b/Src/math.c index 377d1ac9c..beef74525 100644 --- a/Src/math.c +++ b/Src/math.c @@ -1156,7 +1156,8 @@ op(int what) if (tp & (OP_E2|OP_E2IO)) { struct mathvalue *mvp = stack + sp + 1; lv = stack[sp+1].lval; - push(setmathvar(mvp,c), mvp->lval, 0); + c = setmathvar(mvp, c); + push(c, mvp->lval, 0); } else push(c,NULL, 0); return; -- cgit v1.2.3