1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-27 05:16:38 +02:00

Fixed bug with "set_config" function in plugins API (bug #18448)

This commit is contained in:
Sebastien Helleu
2006-12-04 08:51:10 +00:00
parent 78accc74a3
commit 22f255afbb
4 changed files with 8 additions and 4 deletions
+2 -1
View File
@@ -796,9 +796,10 @@ weechat_plugin_set_config (t_weechat_plugin *plugin, char *option, char *value)
{
/* server config option modification */
server_name = (char *)malloc (pos - option + 1);
strncpy (server_name, option, pos - option);
if (server_name)
{
strncpy (server_name, option, pos - option);
server_name[pos - option] = '\0';
ptr_server = server_search (server_name);
free (server_name);
if (ptr_server)