From 8d17d2f02dfa2b0bb4c19efcf52854fbb7fa19e5 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Fri, 19 May 2000 18:22:50 +0000 Subject: 11467: [#] syntax for output base zsh-users/3071: compdump tweak to avoid // in path --- Src/subst.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'Src/subst.c') diff --git a/Src/subst.c b/Src/subst.c index 94a1222d8..beb99b5ee 100644 --- a/Src/subst.c +++ b/Src/subst.c @@ -1964,10 +1964,13 @@ arithsubst(char *a, char **bptr, char *rest) singsub(&a); v = matheval(a); - if (v.type & MN_FLOAT) + if ((v.type & MN_FLOAT) && !outputradix) b = convfloat(v.u.d, 0, 0, NULL); - else - convbase(buf, v.u.l, 0); + else { + if (v.type & MN_FLOAT) + v.u.l = (zlong) v.u.d; + convbase(buf, v.u.l, outputradix); + } t = *bptr = (char *) hcalloc(strlen(*bptr) + strlen(b) + strlen(rest) + 1); t--; -- cgit v1.2.3