mirror of
https://github.com/weechat/weechat.git
synced 2026-06-25 04:16:38 +02:00
check return value in weechat_ruby_exec() to be a valid value and fix crash when called function return nothing
This commit is contained in:
@@ -154,7 +154,7 @@ weechat_ruby_exec (t_weechat_plugin *plugin,
|
||||
return PLUGIN_RC_KO;
|
||||
}
|
||||
|
||||
if (ruby_retcode == Qnil)
|
||||
if (TYPE(ruby_retcode) != T_FIXNUM)
|
||||
{
|
||||
ruby_plugin->print_server (ruby_plugin, "Ruby error: function \"%s\" must return a valid value", function);
|
||||
return PLUGIN_RC_OK;
|
||||
|
||||
Reference in New Issue
Block a user