From e1c745a0dca56afb9cfcace1ef59449152290188 Mon Sep 17 00:00:00 2001 From: "Barton E. Schaefer" Date: Fri, 22 Apr 2016 10:12:17 -0700 Subject: 38306: in printf formats, treat a missing precision as zero rather than as unlimited --- Src/builtin.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Src/builtin.c') 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++ = '*'; } -- cgit 1.4.1