mirror of
https://github.com/irssi/irssi.git
synced 2024-09-01 04:14:16 -04:00
Correct a wrong use of the 'paste_buffer' variable
The function "static void paste_buffer_join_lines(GArray *buf)" in "src/fe-text/gui-readline.c" is supposed to join lines from the GArray pointed to by *buf under certain circumstances. In the code of the function "buf" is actually used for getting the length of the GArray, but to get a pointer to the data, "paste_buffer->data" is used; paste_buffer is defined in the scope of the whole file. This delivers the desired result, because this function is only called once, with "paste_buffer" as the argument. If paste_buffer_join_lines() will ever be used with a different argument, it will fail.
This commit is contained in:
parent
fbb838b3b0
commit
011eda7d9e
@ -177,7 +177,7 @@ static void paste_buffer_join_lines(GArray *buf)
|
||||
if (buf->len == 0)
|
||||
return;
|
||||
|
||||
arr = (unichar *) paste_buffer->data;
|
||||
arr = (unichar *)buf->data;
|
||||
|
||||
/* first line */
|
||||
if (IS_WHITE(arr[0]))
|
||||
|
Loading…
Reference in New Issue
Block a user