From cc3a4466605fe8dfc31f3b75779110ac93055bc1 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Mon, 16 Apr 2012 21:50:23 -0400 Subject: [PATCH] fix %lf, etc. with printf the l prefix is redundant/no-op with printf, since default promotions always promote floats to double; however, it is valid, and printf was wrongly rejecting it. --- src/stdio/vfprintf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/stdio/vfprintf.c b/src/stdio/vfprintf.c index b5001ff2..928c8c16 100644 --- a/src/stdio/vfprintf.c +++ b/src/stdio/vfprintf.c @@ -73,6 +73,8 @@ static const unsigned char states[]['z'-'A'+1] = { }, { /* 1: l-prefixed */ S('d') = LONG, S('i') = LONG, S('o') = ULONG, S('u') = ULONG, S('x') = ULONG, S('X') = ULONG, + S('e') = DBL, S('f') = DBL, S('g') = DBL, S('a') = DBL, + S('E') = DBL, S('F') = DBL, S('G') = DBL, S('A') = DBL, S('c') = INT, S('s') = PTR, S('n') = PTR, S('l') = LLPRE, }, { /* 2: ll-prefixed */ -- 2.20.1