diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2013-01-20 20:29:03 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2013-01-20 20:29:03 +0000 |
commit | 79a60aa3a9cb8a9e44077937fb1ad6e876eac83a (patch) | |
tree | 37bab7177378fa30f795cbaec3767a7b2a089349 /lib/libc | |
parent | 40c471dbe2bfff98f8b1030f2cadfb798320c72b (diff) |
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')
-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; } } |