summary refs log tree commit diff
path: root/src/bltin
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2018-03-25 10:33:38 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2018-03-25 10:33:38 +0800
commitfcb3864e0e348c206c12b3dae9e734d1efa2029e (patch)
treef4e279c507e19fc237ebb42d57d5259483be65d2 /src/bltin
parentparser: Fix backquote support in here-document EOF mark (diff)
downloaddash-fcb3864e0e348c206c12b3dae9e734d1efa2029e.tar.gz
dash-fcb3864e0e348c206c12b3dae9e734d1efa2029e.zip
Revert "[BUILTIN] Remove unnecessary restoration of format string in printf"
This reverts commit 7bb413255368e94395237d789f522891093c5774.

The commit breaks printf with more than argument.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'src/bltin')
-rw-r--r--src/bltin/printf.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/bltin/printf.c b/src/bltin/printf.c
index a626cee..ec7c8c2 100644
--- a/src/bltin/printf.c
+++ b/src/bltin/printf.c
@@ -209,6 +209,7 @@ pc:
 				if (print_escape_str(start, param, array,
 						     getstr()))
 					goto out;
+				*fmt = 'b';
 				break;
 			case 'c': {
 				int p = getchr();
ent HTML class namesJune McEnroe 2020-12-29Rename Tag class to IdentifierTagJune McEnroe 2020-12-29Change HTML class from hi to hilexJune McEnroe 2020-12-29Add hilex HTML outputJune McEnroeA names with BIT macroJune McEnroe 2019-11-09Define macro for bit flag enumsJune McEnroe 2019-11-08Check that password is hashedJune McEnroe 2019-11-08Avoid calling getopt_long again after it returns -1June McEnroe On GNU, calling getopt_long again will reset optind back to the first non-option argument, which would cause an infinite loop of reading the same configurtion file forever. 2019-11-08Only change AWAY status for registered clientsJune McEnroe Turns out I did eventually fix this, because I may want to implement "passive clients" for logging or notification stuff, which wouldn't affect AWAY status either. 2019-11-07Just write the example normallyJune McEnroe 2019-11-07Include path in readlinkat errorJune McEnroe 2019-11-07Call clientConsume before clientRecvJune McEnroe This might reduce the frequency of a client getting its own message back because it was behind in the ring when it sent it. 2019-11-06Use -l:filename in Linux.mkJune McEnroe 2019-11-06Fix compat.h for #defined strlcpyJune McEnroe 2019-11-06Allow unsetting LIBRESSL_PREFIXJune McEnroe 2019-11-06Document calico service configurationJune McEnroe 2019-11-06Document SASL EXTERNAL configuration in more detailJune McEnroe 2019-11-06Document pounce service configurationJune McEnroe 2019-11-06Mention Darwin and GNU/Linux in READMEJune McEnroe 2019-11-06Assume LibreSSL from brew on DarwinJune McEnroe 2019-11-06Remove -DNO_EXPLICIT_BZERO from Darwin.mkJune McEnroe 2019-11-06Don't install rc scripts or dirs on LinuxJune McEnroe