diff options
author | 2013-01-20 20:29:02 +0000 | |
---|---|---|
committer | 2013-01-20 20:29:02 +0000 | |
commit | 8095dfd3b09a86aedce8b1957c816c36afdc20be (patch) | |
tree | f718c04ee1e6eb778c60e47c24ba30a04a1bab1e /lib/libc/time/wcsftime.c | |
parent | PIC-related code should follow the #ifdef __PIC__ line, not the #else line. (diff) | |
download | wireguard-openbsd-8095dfd3b09a86aedce8b1957c816c36afdc20be.tar.xz wireguard-openbsd-8095dfd3b09a86aedce8b1957c816c36afdc20be.zip |
Properly handle "%%" and "%N" where N is not a supported escape.
This is consistent with strftime(3) behavior. OK stsp@
Diffstat (limited to 'lib/libc/time/wcsftime.c')
-rw-r--r-- | lib/libc/time/wcsftime.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libc/time/wcsftime.c b/lib/libc/time/wcsftime.c index ed0db3525d1..5760493a3a2 100644 --- a/lib/libc/time/wcsftime.c +++ b/lib/libc/time/wcsftime.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wcsftime.c,v 1.1 2011/10/10 14:40:25 espie Exp $ */ +/* $OpenBSD: wcsftime.c,v 1.2 2013/01/20 20:29:02 millert Exp $ */ #include "private.h" /* @@ -505,6 +505,8 @@ label: ** character itself as printf(3) also does. */ default: + if (pt != ptlim) + *pt++ = *format; break; } } |