filtering: when returning to a line number, ensure it is within range
The function line_from_number() can handle only line numbers that exist, and will crash otherwise. (The lack of checks makes the function fast.) This fixes https://savannah.gnu.org/bugs/?63120. Bug existed since commit d1e28417 from five weeks ago.
Этот коммит содержится в:
родитель
119ec47072
Коммит
d4d2840f5d
@ -747,7 +747,11 @@ void goto_line_posx(ssize_t linenumber, size_t pos_x)
|
||||
recook |= perturbed;
|
||||
#endif
|
||||
|
||||
openfile->current = line_from_number(linenumber);
|
||||
if (linenumber < openfile->filebot->lineno)
|
||||
openfile->current = line_from_number(linenumber);
|
||||
else
|
||||
openfile->current = openfile->filebot;
|
||||
|
||||
openfile->current_x = pos_x;
|
||||
openfile->placewewant = xplustabs();
|
||||
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user