summaryrefslogtreecommitdiff
path: root/lib/libc/time
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2013-01-20 20:29:03 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2013-01-20 20:29:03 +0000
commit79a60aa3a9cb8a9e44077937fb1ad6e876eac83a (patch)
tree37bab7177378fa30f795cbaec3767a7b2a089349 /lib/libc/time
parent40c471dbe2bfff98f8b1030f2cadfb798320c72b (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/time')
-rw-r--r--lib/libc/time/wcsftime.c4
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;
}
}