commit 5a13865385cf32e072c8dd69c5d6bf4adb6e4957
parent 26168d5c37f370ac0d478ede0810dc12619ac00b
Author: FRIGN <dev@frign.de>
Date: Mon, 16 Feb 2015 10:30:19 +0100
Fix \c behaviour
The loop magic broke along the way. Just drop that and write a
proper early exit (= termination).
Now it should work as expected.
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/printf.c b/printf.c
@@ -102,7 +102,9 @@ main(int argc, char *argv[])
case 'b':
if ((tmp = strstr(arg, "\\c"))) {
*tmp = 0;
- argi = argc;
+ unescape(arg);
+ fputs(arg, stdout);
+ return 0;
}
unescape(arg);
fputs(arg, stdout);