about summary refs log tree commit diff
path: root/Src/params.c
diff options
context:
space:
mode:
authorBart Schaefer <barts@users.sourceforge.net>2000-09-04 07:21:57 +0000
committerBart Schaefer <barts@users.sourceforge.net>2000-09-04 07:21:57 +0000
commit07c0b1a306f099d1c8cb530286a1a32950f0185e (patch)
tree796c576613936f2bdc5768fe1a666ae9a9c476d2 /Src/params.c
parentf23e444392493677896f947ae4ca0e1da07ff696 (diff)
downloadzsh-07c0b1a306f099d1c8cb530286a1a32950f0185e.tar.gz
zsh-07c0b1a306f099d1c8cb530286a1a32950f0185e.tar.xz
zsh-07c0b1a306f099d1c8cb530286a1a32950f0185e.zip
Fix 12722.
Diffstat (limited to 'Src/params.c')
-rw-r--r--Src/params.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Src/params.c b/Src/params.c
index 2d38272a6..93319dbfe 100644
--- a/Src/params.c
+++ b/Src/params.c
@@ -3049,8 +3049,10 @@ convbase(char *s, zlong v, int base)
 	    sprintf(s, "0x");
 	else if (isset(CBASES) && base == 8 && isset(OCTALZEROES))
 	    sprintf(s, "0");
-	else
+	else if (base != 10)
 	    sprintf(s, "%d#", base);
+	else
+	    *s = 0;
 	s += strlen(s);
     } else
 	base = -base;