0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 8.2.1599: missing line end when skipping a long line with :cgetfile

Problem:    Missing line end when skipping a long line with :cgetfile.
Solution:   Fix off-by-one error. (closes #6870)
This commit is contained in:
Bram Moolenaar
2020-09-05 17:03:40 +02:00
parent 2ce14589f2
commit 59941cbd80
3 changed files with 21 additions and 1 deletions

View File

@@ -810,7 +810,7 @@ qf_get_next_file_line(qfstate_T *state)
// reached.
if (fgets((char *)IObuff, IOSIZE, state->fd) == NULL
|| (int)STRLEN(IObuff) < IOSIZE - 1
|| IObuff[IOSIZE - 1] == '\n')
|| IObuff[IOSIZE - 2] == '\n')
break;
}