memmove() the right size when expanding tree.

This commit is contained in:
nicm 2016-04-28 07:20:26 +00:00
parent 36976ce5e6
commit dd8ba0b5a8

View File

@ -497,7 +497,7 @@ window_choose_expand(struct window_pane *wp, struct session *s, u_int pos)
sizeof *data->list);
memmove(&data->list[pos + 2],
&data->list[pos + 1],
(data->list_size - pos) *
(data->list_size - (pos + 1)) *
sizeof *data->list);
memcpy(&data->list[pos + 1],
&data->old_list[i],