memory: move the correct number of bytes, and not one too many
We want to reduce the size of the answer by one byte,
not keep the full answer (plus terminating NUL).
This fixes https://savannah.gnu.org/bugs/?60764.
Bug existed since version 2.9.8, commit f304b9ae
,
since piping text to an external command was introduced.
master
parent
74c6bdac9f
commit
d7e3226158
|
@ -426,7 +426,7 @@ void draw_the_promptbar(void)
|
||||||
void add_or_remove_pipe_symbol_from_answer(void)
|
void add_or_remove_pipe_symbol_from_answer(void)
|
||||||
{
|
{
|
||||||
if (answer[0] == '|') {
|
if (answer[0] == '|') {
|
||||||
memmove(answer, answer + 1, strlen(answer) + 1);
|
memmove(answer, answer + 1, strlen(answer));
|
||||||
if (typing_x > 0)
|
if (typing_x > 0)
|
||||||
typing_x--;
|
typing_x--;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue