summaryrefslogtreecommitdiff
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
parentf9b7929289b120b4e60a1751d39a8bf8f24edfa0 (diff)
downloadzsh-88b886e6034b1902c929eb6e6e2a06b9f4854c03.tar.gz
zsh-88b886e6034b1902c929eb6e6e2a06b9f4854c03.zip
12741: outputradix was stomped on by nested matheval
-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;