Commit 42f13851 authored by Sebastien Granjoux's avatar Sebastien Granjoux

Fix #577006 – crash creating new file

	* plugins/macro/macro-util.c:
	Fix #577006 – crash creating new file

svn path=/trunk/; revision=4903
parent 54e53c07
2009-03-28 Sébastien Granjoux <seb.sfo@free.fr>
* plugins/macro/macro-util.c:
Fix #577006 – crash creating new file
2009-03-28 Sébastien Granjoux <seb.sfo@free.fr>
* plugins/scintilla/text-editor-iterable.c:
......@@ -37,13 +37,12 @@ static char *
get_date_time(void)
{
time_t cur_time = time(NULL);
gchar *DateTime;
const gchar *DateTime;
gchar *buffer;
DateTime = g_new(gchar, 100);
sprintf("%s", DateTime,ctime(&cur_time));
DateTime = ctime(&cur_time);
/* Remove new line at the end */
buffer = g_strndup(DateTime, strlen(DateTime) - 1);
g_free(DateTime);
return buffer;
}
......
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