summaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2004-09-16 20:21:04 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2004-09-16 20:21:04 +0000
commit4935345814eda1bd402d8cd1aa169c060f26bf38 (patch)
tree838a8cd65048051d4501d823a78cb68837deab64 /lib/libc
parente6fc1535b8cc2ca34cd60aafef1310b1dba3e197 (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.c9
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;