about summary refs log tree commit diff
path: root/Src/math.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2000-09-04 15:52:16 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2000-09-04 15:52:16 +0000
commit88b886e6034b1902c929eb6e6e2a06b9f4854c03 (patch)
tree5f6859b566fd0dfb4db1dc71cc4a41ffaaf0047c /Src/math.c
parentf9b7929289b120b4e60a1751d39a8bf8f24edfa0 (diff)
downloadzsh-88b886e6034b1902c929eb6e6e2a06b9f4854c03.tar.gz
zsh-88b886e6034b1902c929eb6e6e2a06b9f4854c03.tar.xz
zsh-88b886e6034b1902c929eb6e6e2a06b9f4854c03.zip
12741: outputradix was stomped on by nested matheval
Diffstat (limited to 'Src/math.c')
-rw-r--r--Src/math.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Src/math.c b/Src/math.c
index 77c7df2a5..282622f73 100644
--- a/Src/math.c
+++ b/Src/math.c
@@ -959,7 +959,9 @@ matheval(char *s)
     char *junk;
     mnumber x;
     int xmtok = mtok;
-    outputradix = 0;
+    /* maintain outputradix across levels of evaluation */
+    if (!mlevel)
+	outputradix = 0;
 
     if (!*s) {
 	x.type = MN_INTEGER;