printf: short-circuit output when argument to %b includes \c
authorRon Yorston <rmy@pobox.com>
Sun, 31 Jan 2016 21:22:25 +0000 (22:22 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sun, 31 Jan 2016 21:23:05 +0000 (22:23 +0100)
commit4a79224cfcde1c941f581d0c61edaf293e743af5
tree6f10b991128b4f4c1a83bf61b33ebacfcb0ef802
parent2a4bba3ce2e00e55e6690fa8ba2607679277eed4
printf: short-circuit output when argument to %b includes \c

printf wasn't correctly handling \c in an argument to the %b format
specifier.

   printf %bXX OK\\c

returned 'OK\cXX' rather than the expected 'OK'.

function                                             old     new   delta
printf_main                                          886     899     +13

Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
coreutils/printf.c