aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2020-09-02 19:01:31 +0200
committerPřemysl Eric Janouch <p@janouch.name>2020-09-02 20:00:09 +0200
commita48023553ec7a0133e0a7bed20e0271ceb1acfbd (patch)
tree1a01a76bcfd2b4d1c85def3c9c1916f86db30b66
parentd29317b29c277ff7c36e34b386ac4258c137e501 (diff)
downloadxK-a48023553ec7a0133e0a7bed20e0271ceb1acfbd.tar.gz
xK-a48023553ec7a0133e0a7bed20e0271ceb1acfbd.tar.xz
xK-a48023553ec7a0133e0a7bed20e0271ceb1acfbd.zip
degesch: fix a pointer operation in the libedit layer
-rw-r--r--degesch.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/degesch.c b/degesch.c
index d642cde..5afd49c 100644
--- a/degesch.c
+++ b/degesch.c
@@ -1016,7 +1016,8 @@ input_el__restore_buffer (struct input_el *self, struct input_el_buffer *buffer)
el_winsertstr (self->editline, buffer->saved_line);
el_cursor (self->editline,
-(buffer->saved_len - buffer->saved_point));
- cstr_set (&buffer->saved_line, NULL);
+ free (buffer->saved_line);
+ buffer->saved_line = NULL;
}
}