diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2024-05-05 17:49:20 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2024-05-05 17:49:20 +0200 |
commit | 9ceea3697bf5f194d4a86e46dd9b04012dc0592c (patch) | |
tree | 2106ab68b8f3a229bd7f22bcb2c372694d0b4399 /src/plugins/relay/api/relay-api-msg.c | |
parent | 0cf504dce70c5d804715fd6946476c5a17950d96 (diff) | |
download | weechat-9ceea3697bf5f194d4a86e46dd9b04012dc0592c.zip |
relay/api: fix read of buffer lines when lines parameter is LONG_MIN
Diffstat (limited to 'src/plugins/relay/api/relay-api-msg.c')
-rw-r--r-- | src/plugins/relay/api/relay-api-msg.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/relay/api/relay-api-msg.c b/src/plugins/relay/api/relay-api-msg.c index 9ef294dae..d02868301 100644 --- a/src/plugins/relay/api/relay-api-msg.c +++ b/src/plugins/relay/api/relay-api-msg.c @@ -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) |