mirror of
https://github.com/weechat/weechat.git
synced 2026-07-03 16:23:14 +02:00
Fix crash in perl plugin when MULTIPLICITY is disabled
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
WeeChat ChangeLog
|
||||
=================
|
||||
Sébastien Helleu <flashcode@flashtux.org>
|
||||
v0.3.4-rc1, 2010-12-15
|
||||
v0.3.4-rc1, 2010-12-16
|
||||
|
||||
|
||||
Version 0.3.4 (under dev!)
|
||||
@@ -194,6 +194,7 @@ Version 0.3.2 (2010-04-18)
|
||||
* alias: add custom completion for aliases (task #9479)
|
||||
* scripts: allow script commands to reload only one script
|
||||
* scripts: fix bug with callbacks when loading a script already loaded
|
||||
* perl: fix crash when MULTIPLICITY is disabled
|
||||
* perl: fix crash when callbacks are called during script initialization
|
||||
(bug #29018)
|
||||
* perl: fix crash on /quit or unload of plugin under FreeBSD and Cygwin
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user