diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-06-09 16:40:46 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-06-09 16:40:46 +0200 |
commit | 954bb0636390751c0665d7d730a13d86dc5bc6e6 (patch) | |
tree | 3efb6e34f415e444f994ce1764cbcccceb6388e6 | |
parent | 541faf7a73448bbed9e8d129f2001fb34e39b7b1 (diff) | |
download | vim-git-954bb0636390751c0665d7d730a13d86dc5bc6e6.tar.gz |
patch 8.1.1509: cmdline_row can become negative, causing a crashv8.1.1509
Problem: Cmdline_row can become negative, causing a crash.
Solution: Make sure cmdline_row does not become negagive. (closes #4102)
-rw-r--r-- | src/misc1.c | 6 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/misc1.c b/src/misc1.c index 7ef7e78f0..f5549fdc5 100644 --- a/src/misc1.c +++ b/src/misc1.c @@ -1447,9 +1447,9 @@ prompt_for_number(int *mouse_used) i = get_number(TRUE, mouse_used); if (KeyTyped) { - /* don't call wait_return() now */ - /* msg_putchar('\n'); */ - cmdline_row = msg_row - 1; + // don't call wait_return() now + if (msg_row > 0) + cmdline_row = msg_row - 1; need_wait_return = FALSE; msg_didany = FALSE; msg_didout = FALSE; diff --git a/src/version.c b/src/version.c index 1156fd64b..b392cfdc5 100644 --- a/src/version.c +++ b/src/version.c @@ -778,6 +778,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1509, +/**/ 1508, /**/ 1507, |