Commit d22bb9a5 authored by Michael Smith's avatar Michael Smith

Major stability fixes, to make things work better on bad input. Stops some

memory leaks too, I think.

svn path=/trunk/log/; revision=2326
parent 3eac17e8
......@@ -161,7 +161,7 @@ void log_write(int log_id, int priority, const char *cat, const char *fmt, ...)
vsnprintf(line, LOG_MAXLINELEN, fmt, ap);
now = time(NULL);
strftime(tyme, 128, "[%Y-%m-%d %H:%M:%S]", gmtime(&now));
strftime(tyme, 128, "[%Y-%m-%d %H:%M:%S]", localtime(&now));
snprintf(pre, 256, "%s %s", prior[priority-1], cat);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment