mirror of
https://github.com/weechat/weechat.git
synced 2026-06-28 22:06:38 +02:00
fix bugs in get_buffer_data() which breaks the retrieval of buffer content (perl, lua)
This commit is contained in:
@@ -1767,8 +1767,8 @@ weechat_lua_get_buffer_data (lua_State *L)
|
||||
server = lua_tostring (lua_current_interpreter, -1);
|
||||
break;
|
||||
case 2:
|
||||
channel = lua_tostring (lua_current_interpreter, -2);
|
||||
server = lua_tostring (lua_current_interpreter, -1);
|
||||
server = lua_tostring (lua_current_interpreter, -2);
|
||||
channel = lua_tostring (lua_current_interpreter, -1);
|
||||
break;
|
||||
default:
|
||||
lua_plugin->print_server (lua_plugin,
|
||||
@@ -1777,7 +1777,7 @@ weechat_lua_get_buffer_data (lua_State *L)
|
||||
lua_pushnumber (lua_current_interpreter, 0);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
buffer_data = lua_plugin->get_buffer_data (lua_plugin, (char *) server, (char *) channel);
|
||||
if (!buffer_data)
|
||||
{
|
||||
|
||||
@@ -1531,6 +1531,8 @@ static XS (XS_weechat_get_buffer_data)
|
||||
server = SvPV (ST (0), PL_na);
|
||||
if (items >= 2)
|
||||
channel = SvPV (ST (1), PL_na);
|
||||
|
||||
SP -= items;
|
||||
|
||||
buffer_data = perl_plugin->get_buffer_data (perl_plugin, server, channel);
|
||||
count = 0;
|
||||
|
||||
Reference in New Issue
Block a user