1
0
mirror of https://github.com/rkd77/elinks.git synced 2025-02-02 15:09:23 -05:00

[clipboard] Off by one.

This commit is contained in:
Witold Filipczyk 2020-08-02 16:24:00 +02:00
parent 9fd79ec508
commit 53002765c4

View File

@ -1000,11 +1000,11 @@ copy_to_clipboard2(struct document_view *doc_view)
}
starty = document->clipboard_box.y;
endy = int_min(document->clipboard_box.y + document->clipboard_box.height, document->height - 1);
endy = int_min(document->clipboard_box.y + document->clipboard_box.height, document->height);
startx = document->clipboard_box.x;
utf8 = document->options.utf8;
for (y = starty; y <= endy; y++) {
for (y = starty; y < endy; y++) {
int endx = int_min(document->clipboard_box.x + document->clipboard_box.width, document->data[y].length);
int x;