← Commit list

6852effbc

Denis Vlasenko
Denis Vlasenko
2009-03-03
FAILED Duration: 30s

Subject

printf: fix 1.12.0 breakage (from %*d fix). It was misinterpreting "*"

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

coreutils/printf.c+3 -3
@@ -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);