From f13413c26a30bfa5615ab34b7a1acd5cb3336bba Mon Sep 17 00:00:00 2001 From: TingPing Date: Sun, 15 Sep 2013 07:40:36 -0400 Subject: Fix logging networks with invalid names on Windows --- src/common/text.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/common/text.c b/src/common/text.c index e0cdb5ee..d18b9c1a 100644 --- a/src/common/text.c +++ b/src/common/text.c @@ -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); -- cgit 1.4.1