about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorMikael Magnusson <mikachu@gmail.com>2011-05-27 01:42:30 +0000
committerMikael Magnusson <mikachu@gmail.com>2011-05-27 01:42:30 +0000
commitbd2d0636d26c78487e6abc364a116d37a450bf29 (patch)
treefcf5318e18051e4d1124aa520731e3d09c3bf798 /Src
parent6c6cb0e23d8a8788b103a6de34665324246963c0 (diff)
downloadzsh-bd2d0636d26c78487e6abc364a116d37a450bf29.tar.gz
zsh-bd2d0636d26c78487e6abc364a116d37a450bf29.tar.xz
zsh-bd2d0636d26c78487e6abc364a116d37a450bf29.zip
29329: fix undefined behaviour in math.c
Diffstat (limited to 'Src')
-rw-r--r--Src/math.c3
1 files changed, 2 insertions, 1 deletions
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;