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

scripts: do now allow empty script name in function "register"

This commit is contained in:
Sebastien Helleu
2013-01-22 09:26:11 +01:00
parent 1edabb98f5
commit 0e3bec6d2e
13 changed files with 180 additions and 187 deletions
+3 -3
View File
@@ -550,11 +550,11 @@ plugin_script_add (struct t_weechat_plugin *weechat_plugin,
{
struct t_plugin_script *new_script;
if (strchr (name, ' '))
if (!name[0] || strchr (name, ' '))
{
weechat_printf (NULL,
_("%s: error loading script \"%s\" (bad name, spaces "
"are forbidden)"),
_("%s: error loading script \"%s\" (spaces or empty name "
"not allowed)"),
weechat_plugin->name, name);
return NULL;
}