1
0
mirror of https://github.com/irssi/irssi.git synced 2024-11-03 04:27:19 -05: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:
Fabian Kurz 2015-11-22 21:24:05 +01:00 committed by LemonBoy
parent fbb838b3b0
commit 011eda7d9e

View File

@ -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]))