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

Fix crash in perl plugin when MULTIPLICITY is disabled

This commit is contained in:
Sebastien Helleu
2010-12-16 14:27:16 +01:00
parent 29f1461c42
commit f2c9961a21
2 changed files with 7 additions and 3 deletions
+5 -2
View File
@@ -275,11 +275,14 @@ weechat_perl_exec (struct t_plugin_script *script,
if (script->interpreter)
PERL_SET_CONTEXT (script->interpreter);
#else
length = strlen (script->interpreter) + strlen (function) + 3;
length = strlen ((script->interpreter) ? script->interpreter : perl_main) +
strlen (function) + 3;
func = (char *) malloc (length);
if (!func)
return NULL;
snprintf (func, length, "%s::%s", (char *) script->interpreter, function);
snprintf (func, length, "%s::%s",
(char *) ((script->interpreter) ? script->interpreter : perl_main),
function);
#endif
ENTER;