Do not attempt to divide by zero when working out copy position.

pull/2270/head
nicm 2020-05-25 12:12:58 +00:00
parent 26e8e467e8
commit 4589297e43
1 changed files with 1 additions and 1 deletions

View File

@ -3167,7 +3167,7 @@ window_copy_match_at_cursor(struct window_copy_mode_data *data)
*/
for (at = start; at <= end; at++) {
py = at / sx;
px = at % (py * sx);
px = at - (py * sx);
grid_get_cell(gd, px, py, &gc);
buf = xrealloc(buf, len + gc.data.size + 1);