From c549aa4e76bde4b52e877738729b1acdbac4334a Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 4 Jul 2011 22:39:13 -0400 Subject: [PATCH] Bug #1279 - Fixed strftime --- src/misc.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/misc.cpp b/src/misc.cpp index da07eaa28..967e2f6ef 100644 --- a/src/misc.cpp +++ b/src/misc.cpp @@ -240,7 +240,8 @@ Anope::string duration(const time_t &t, NickCore *nc) Anope::string do_strftime(const time_t &t, NickCore *nc, bool short_output) { tm tm = *localtime(&t); - const char *buf = translate(nc, _("%b %d %H:%M:%S %Y %Z")); + char buf[BUFSIZE]; + strftime(buf, sizeof(buf), translate(nc, _("%b %d %H:%M:%S %Y %Z")), &tm); if (short_output) return buf; if (t < Anope::CurTime)