1
0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-11-19 13:33:52 +01:00

21352: Harald van Dijk: handle null after % in printf format specifier

This commit is contained in:
Oliver Kiddle 2005-06-17 08:37:46 +00:00
parent 2a176ec84e
commit 14bfaab3ef

@ -3653,7 +3653,7 @@ bin_print(char *name, char **args, Options ops, int func)
/* copy only one of each flag as spec has finite size */
memset(flags, 0, sizeof(flags));
while ((flag = strchr(flagch, *c))) {
while (*c && (flag = strchr(flagch, *c))) {
if (!flags[flag - flagch]) {
flags[flag - flagch] = 1;
*d++ = *c;