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

relay/api: fix read of buffer lines when lines parameter is LONG_MIN

This commit is contained in:
Sébastien Helleu
2024-05-05 17:49:20 +02:00
parent 0cf504dce7
commit 9ceea3697b
+1 -1
View File
@@ -560,7 +560,7 @@ relay_api_msg_lines_to_json (struct t_gui_buffer *buffer,
ptr_line = weechat_hdata_pointer (relay_hdata_lines, ptr_lines, "last_line");
if (ptr_line)
{
for (i = 1; i < lines * -1; i++)
for (i = -1; i > lines; i--)
{
ptr_line = weechat_hdata_move (relay_hdata_line, ptr_line, -1);
if (!ptr_line)