1
0
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:
Emmanuel Bouthenot
2006-05-17 12:41:58 +00:00
parent 524fbba036
commit c2dd7e4ffb
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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;