summaryrefslogtreecommitdiffstats
path: root/src/ex_docmd.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-09-02 16:47:16 +0100
committerBram Moolenaar <Bram@vim.org>2022-09-02 16:47:16 +0100
commit35d21c6830fc2d68aca838424a0e786821c5891c (patch)
tree129500dfedad747749dbb49a78b54bc630c6df8d /src/ex_docmd.c
parent8deb2b30c77035bb682ccf80b781455ac1d6038b (diff)
patch 9.0.0360: crash when invalid line number on :for is ignoredv9.0.0360
Problem: Crash when invalid line number on :for is ignored. Solution: Do not check breakpoint for non-existing line.
Diffstat (limited to 'src/ex_docmd.c')
-rw-r--r--src/ex_docmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index ae1f1959b7..0b6b217121 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -1068,7 +1068,7 @@ do_cmdline(
// Check for the next breakpoint at or after the ":while"
// or ":for".
- if (breakpoint != NULL)
+ if (breakpoint != NULL && lines_ga.ga_len > current_line)
{
*breakpoint = dbg_find_breakpoint(
getline_equal(fgetline, cookie, getsourceline),