projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
22f180f
)
printf: fix breakage in handling '*'
author
Denis Vlasenko
<vda.linux@googlemail.com>
Wed, 4 Mar 2009 01:30:32 +0000
(
01:30
-0000)
committer
Denis Vlasenko
<vda.linux@googlemail.com>
Wed, 4 Mar 2009 01:30:32 +0000
(
01:30
-0000)
coreutils/printf.c
patch
|
blob
|
history
diff --git
a/coreutils/printf.c
b/coreutils/printf.c
index b0a48cda4a1738b0baf95456a4e566efd245e579..ca8e51cf2243dbfb87549641d7ac39db50831786 100644
(file)
--- a/
coreutils/printf.c
+++ b/
coreutils/printf.c
@@
-139,14
+139,14
@@
static void print_direc(char *format, unsigned fmt_length,
char saved;
char *have_prec, *have_width;
+ saved = format[fmt_length];
+ format[fmt_length] = '\0';
+
have_prec = strstr(format, ".*");
have_width = strchr(format, '*');
if (have_width - 1 == have_prec)
have_width = NULL;
- saved = format[fmt_length];
- format[fmt_length] = '\0';
-
switch (format[fmt_length - 1]) {
case 'c':
printf(format, *argument);