diff options
author | 2004-09-16 20:21:03 +0000 | |
---|---|---|
committer | 2004-09-16 20:21:03 +0000 | |
commit | d168686c2a688c60bcb9ac72591afce62065c6ee (patch) | |
tree | 3f683c76746c0a68d635592de9136fa40c246c67 /lib/libc/stdio/vfprintf.c | |
parent | nice off_t cast (diff) | |
download | wireguard-openbsd-d168686c2a688c60bcb9ac72591afce62065c6ee.tar.xz wireguard-openbsd-d168686c2a688c60bcb9ac72591afce62065c6ee.zip |
Handle ll's correctly for positional args. Problem spotted by hin@,
ok henning@ millert@ deraadt@
Diffstat (limited to 'lib/libc/stdio/vfprintf.c')
-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; |