summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Src/math.c4
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 16229693f..2ef9f20d5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2000-09-04 Peter Stephenson <pws@csr.com>
+
+ * 12741: Src/math.c: problem with nested matheval unexpectedly
+ stomping on outputradix.
+
2000-09-04 Andrej Borsenkow <Andrej.Borsenkow@mow.siemens.ru>
* 12736: configure.in: Fix `make install' dependency
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;