diff --git a/ChangeLog b/ChangeLog index dc47ddb8c71650accf561f2599018b0533019207..0a1c5b6788412af8d96d74e4a737e1ec9270b7df 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,8 @@ * src/winio.c (edit_scroll): The amount to scroll is never zero. * src/prompt.c (do_statusbar_prev_word, do_statusbar_next_word), src/move.c (do_prev_word, do_next_word): Sort these in standard way. + * src/prompt.c (do_statusbar_output): Don't move too many bytes. + This fixes Savannah bug #47219 (uncovered by r5655). 2016-02-21 Benno Schulenberg <bensberg@justemail.net> * src/files.c (input_tab): If the first Tab added the part that all diff --git a/src/prompt.c b/src/prompt.c index 9d5908d7f8cee5b4855b271c753a9f70efecb06b..55855b6c45d1669763db704392d031782f5644f6 100644 --- a/src/prompt.c +++ b/src/prompt.c @@ -290,7 +290,7 @@ void do_statusbar_output(int *the_input, size_t input_len, assert(statusbar_x <= answer_len); charmove(answer + statusbar_x + char_buf_len, answer + statusbar_x, - answer_len - statusbar_x + char_buf_len); + answer_len - statusbar_x + 1); strncpy(answer + statusbar_x, char_buf, char_buf_len); answer_len += char_buf_len;