about summary refs log tree commit diff
diff options
context:
space:
mode:
authorOliver Kiddle <opk@zsh.org>2015-05-14 22:56:24 +0200
committerOliver Kiddle <opk@zsh.org>2015-05-14 22:56:24 +0200
commit63ffbab84d5071bea0fdb2c8b16368283ec75253 (patch)
treeb82f89e00d40378243b581fbeaa09fd6857fb51c
parent55716ea3370cfc3be3d31f89b017cbb8e5b9dbd4 (diff)
downloadzsh-63ffbab84d5071bea0fdb2c8b16368283ec75253.tar.gz
zsh-63ffbab84d5071bea0fdb2c8b16368283ec75253.tar.xz
zsh-63ffbab84d5071bea0fdb2c8b16368283ec75253.zip
Øystein Walle: 34841 (tweaked): allow grouping of thousands in printf format string
-rw-r--r--ChangeLog3
-rw-r--r--Src/builtin.c6
2 files changed, 6 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index a47abfcb9..c11bd3f98 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2015-05-14  Oliver Kiddle  <opk@zsh.org>
 
+	* Øystein Walle: 34841 (tweaked): Src/builtin.c:
+	allow grouping of thousands in printf format string
+
 	* unposted: Completion/BSD/Type/.distfiles: include new dir
 
 	* Daniel Hahler: 35062: Completion/Unix/Command/_git:
diff --git a/Src/builtin.c b/Src/builtin.c
index 18dad7491..dbcd02206 100644
--- a/Src/builtin.c
+++ b/Src/builtin.c
@@ -3770,9 +3770,9 @@ bin_print(char *name, char **args, Options ops, int func)
 {
     int flen, width, prec, type, argc, n, narg, curlen = 0;
     int nnl = 0, fmttrunc = 0, ret = 0, maxarg = 0, nc = 0;
-    int flags[5], *len;
-    char *start, *endptr, *c, *d, *flag, *buf = NULL, spec[13], *fmt = NULL;
-    char **first, **argp, *curarg, *flagch = "0+- #", save = '\0', nullstr = '\0';
+    int flags[6], *len;
+    char *start, *endptr, *c, *d, *flag, *buf = NULL, spec[14], *fmt = NULL;
+    char **first, **argp, *curarg, *flagch = "'0+- #", save = '\0', nullstr = '\0';
     size_t rcount, count = 0;
 #ifdef HAVE_OPEN_MEMSTREAM
     size_t mcount;