degesch: fix a pointer operation in the libedit layer

This commit is contained in:
Přemysl Eric Janouch 2020-09-02 19:01:31 +02:00
parent d29317b29c
commit a48023553e
Signed by: p
GPG Key ID: A0420B94F92B9493
1 changed files with 2 additions and 1 deletions

View File

@ -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;
}
}