mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 8.2.3878: Vim9: debugger tries to read more lines than there are
Problem: Vim9: debugger tries to read more lines than there are. Solution: Check the number of lines. (closes #9394)
This commit is contained in:
@@ -1660,7 +1660,8 @@ handle_debug(isn_T *iptr, ectx_T *ectx)
|
||||
if (end_lnum > iptr->isn_lnum)
|
||||
{
|
||||
ga_init2(&ga, sizeof(char_u *), 10);
|
||||
for (lnum = iptr->isn_lnum; lnum < end_lnum; ++lnum)
|
||||
for (lnum = iptr->isn_lnum; lnum < end_lnum
|
||||
&& lnum <= ufunc->uf_lines.ga_len; ++lnum)
|
||||
{
|
||||
char_u *p = ((char_u **)ufunc->uf_lines.ga_data)[lnum - 1];
|
||||
|
||||
|
Reference in New Issue
Block a user