about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorBarton E. Schaefer <schaefer@zsh.org>2016-04-22 10:12:17 -0700
committerBarton E. Schaefer <schaefer@zsh.org>2016-04-22 10:12:17 -0700
commite1c745a0dca56afb9cfcace1ef59449152290188 (patch)
tree2a674bc7bacdb9c253f2c239b8fa3a639da4b4cc /Src
parent5e71690c1993100032a8e15ee937865aaa2350c4 (diff)
downloadzsh-e1c745a0dca56afb9cfcace1ef59449152290188.tar.gz
zsh-e1c745a0dca56afb9cfcace1ef59449152290188.tar.xz
zsh-e1c745a0dca56afb9cfcace1ef59449152290188.zip
38306: in printf formats, treat a missing precision as zero rather than as unlimited
Diffstat (limited to 'Src')
-rw-r--r--Src/builtin.c3
1 files changed, 2 insertions, 1 deletions
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++ = '*';
 	    }