diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2004-09-16 20:21:04 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2004-09-16 20:21:04 +0000 |
commit | 4935345814eda1bd402d8cd1aa169c060f26bf38 (patch) | |
tree | 838a8cd65048051d4501d823a78cb68837deab64 /lib/libc | |
parent | e6fc1535b8cc2ca34cd60aafef1310b1dba3e197 (diff) |
Handle ll's correctly for positional args. Problem spotted by hin@,
ok henning@ millert@ deraadt@
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/stdio/vfprintf.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/libc/stdio/vfprintf.c b/lib/libc/stdio/vfprintf.c index b8291ffbdfe..ed0cdc1ecdc 100644 --- a/lib/libc/stdio/vfprintf.c +++ b/lib/libc/stdio/vfprintf.c @@ -31,7 +31,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: vfprintf.c,v 1.21 2004/09/14 22:20:21 deraadt Exp $"; +static char *rcsid = "$OpenBSD: vfprintf.c,v 1.22 2004/09/16 20:21:03 otto Exp $"; #endif /* LIBC_SCCS and not lint */ /* @@ -907,7 +907,12 @@ reswitch: switch (ch) { flags |= SHORTINT; goto rflag; case 'l': - flags |= LONGINT; + if (*fmt == 'l') { + fmt++; + flags |= QUADINT; + } else { + flags |= LONGINT; + } goto rflag; case 'q': flags |= QUADINT; |