Initialize fakechan topic to NULL, allocate an empty string if not overridden
This commit is contained in:
parent
908f1c30c4
commit
d7aec4702a
1 changed files with 6 additions and 1 deletions
|
@ -1812,7 +1812,7 @@ conf_begin_fakechannel(struct TopConf *tc)
|
|||
yy_fakechannel->name = rb_strdup(conf_cur_block_name);
|
||||
|
||||
/* Set defaults */
|
||||
yy_fakechannel->topic = "";
|
||||
yy_fakechannel->topic = NULL
|
||||
yy_fakechannel->users_min = 50;
|
||||
yy_fakechannel->users_max = 300;
|
||||
|
||||
|
@ -1845,6 +1845,11 @@ conf_end_fakechannel(struct TopConf *tc)
|
|||
return -1;
|
||||
}
|
||||
|
||||
if(yy_fakechannel->topic == NULL)
|
||||
{
|
||||
yy_fakechannel->topic = rb_strdup("");
|
||||
}
|
||||
|
||||
irc_dictionary_add(fakechannel_dict, yy_fakechannel->name, yy_fakechannel);
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue