about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
Diffstat (limited to 'Src')
-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;