Fix logging networks with invalid names on Windows

This commit is contained in:
TingPing 2013-09-15 07:40:36 -04:00
parent c9418ffca3
commit f13413c26a
1 changed files with 6 additions and 1 deletions

View File

@ -518,7 +518,11 @@ log_create_pathname (char *servname, char *channame, char *netname)
if (!netname)
{
netname = "NETWORK";
netname = strdup ("NETWORK");
}
else
{
netname = log_create_filename (netname);
}
/* first, everything is in UTF-8 */
@ -533,6 +537,7 @@ log_create_pathname (char *servname, char *channame, char *netname)
log_insert_vars (fname, sizeof (fname), prefs.hex_irc_logmask, channame, netname, servname);
free (channame);
free (netname);
/* insert time/date */
now = time (NULL);