summary refs log tree commit diff
path: root/src
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
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 '')
-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();