about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Src/builtin.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 219d55608..4fa96e7fa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2016-04-22  Barton E. Schaefer  <schaefer@zsh.org>
+
+	* 38306: Src/builtin.c: in printf formats, treat a missing
+	precision as zero rather than as unlimited
+
 2016-04-15  Barton E. Schaefer  <schaefer@zsh.org>
 
 	* 38289: Completion/compinit: "builtin enable" in $_comp_setup
diff --git a/Src/builtin.c b/Src/builtin.c
index 4c8fbcdb1..ad01ad4f1 100644
--- a/Src/builtin.c
+++ b/Src/builtin.c
@@ -4736,7 +4736,8 @@ bin_print(char *name, char **args, Options ops, int func)
 		} else if (idigit(*c)) {
 		    prec = strtoul(c, &endptr, 0);
 		    c = endptr;
-		}
+		} else
+		    prec = 0;
 		if (prec >= 0) *d++ = '.', *d++ = '*';
 	    }