summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFabian Kurz <fabian@fkurz.net>2015-11-22 21:24:05 +0100
committerLemonBoy <thatlemon@gmail.com>2015-11-22 21:24:05 +0100
commit011eda7d9e755d1df82b678c05c0cb9b1aaa1e29 (patch)
tree41df431d8e39547610a7cac5fce43312a6333f99 /src
parentfbb838b3b0d30ee41de648d667fa89a2d6b41076 (diff)
downloadirssi-011eda7d9e755d1df82b678c05c0cb9b1aaa1e29.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/fe-text/gui-readline.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fe-text/gui-readline.c b/src/fe-text/gui-readline.c
index dc7185e7..ecf116fe 100644
--- a/src/fe-text/gui-readline.c
+++ b/src/fe-text/gui-readline.c
@@ -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]))