about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Src/builtin.c2
-rw-r--r--Test/B03print.ztst2
3 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 8ab38428c..45c45ccd4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-03-07  Oliver Kiddle  <opk@zsh.org>
+
+	* 19549: Src/builtin.c, Test/B03print.ztst: allow for size
+	modifiers in printf format spec's buffer
+
 2004-03-06  Peter Stephenson  <pws@pwstephenson.fsnet.co.uk>
 
 	* zsh-users/7121: Doc/Zsh/options.yo, Src/options.c,
diff --git a/Src/builtin.c b/Src/builtin.c
index 48ad69324..fbca0b5f5 100644
--- a/Src/builtin.c
+++ b/Src/builtin.c
@@ -3151,7 +3151,7 @@ bin_print(char *name, char **args, Options ops, int func)
     int flen, width, prec, type, argc, n, narg;
     int nnl = 0, ret = 0, maxarg = 0;
     int flags[5], *len;
-    char *start, *endptr, *c, *d, *flag, *buf, spec[11], *fmt = NULL;
+    char *start, *endptr, *c, *d, *flag, *buf, spec[13], *fmt = NULL;
     char **first, *curarg, *flagch = "0+- #", save = '\0', nullstr = '\0';
     size_t rcount, count = 0;
 #ifdef HAVE_OPEN_MEMSTREAM
diff --git a/Test/B03print.ztst b/Test/B03print.ztst
index 9a22f2207..5eb94a27e 100644
--- a/Test/B03print.ztst
+++ b/Test/B03print.ztst
@@ -149,7 +149,7 @@
 0:%n count zeroed on format reuse
 >1
 
-# this should fill spec string with '%0+- #*.*d\0' - 11 characters
+# this may fill spec string with '%0+- #*.*lld\0' - 13 characters
  printf '%1$0+- #-08.5dx\n' 123
 0:maximal length format specification
 >+00123  x