summaryrefslogtreecommitdiff
path: root/src/ex_getln.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-05-19 19:59:35 +0200
committerBram Moolenaar <Bram@vim.org>2019-05-19 19:59:35 +0200
commit16e9b85113e0b354ece1cb4f5fcc7866850f3685 (patch)
tree2abe4e3cffe8b0281f0690e5570a47eb2198a826 /src/ex_getln.c
parentf5842c5a533346c4ff41ff666e465c85f1de35d5 (diff)
downloadvim-git-16e9b85113e0b354ece1cb4f5fcc7866850f3685.tar.gz
patch 8.1.1355: obvious mistakes are accepted as valid expressionsv8.1.1355
Problem: Obvious mistakes are accepted as valid expressions. Solution: Be more strict about parsing numbers. (Yasuhiro Matsumoto, closes #3981)
Diffstat (limited to 'src/ex_getln.c')
-rw-r--r--src/ex_getln.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ex_getln.c b/src/ex_getln.c
index f1c30a2d9..ba3dc7358 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -6470,7 +6470,7 @@ get_list_range(char_u **str, int *num1, int *num2)
*str = skipwhite(*str);
if (**str == '-' || vim_isdigit(**str)) /* parse "from" part of range */
{
- vim_str2nr(*str, NULL, &len, 0, &num, NULL, 0);
+ vim_str2nr(*str, NULL, &len, 0, &num, NULL, 0, FALSE);
*str += len;
*num1 = (int)num;
first = TRUE;
@@ -6479,7 +6479,7 @@ get_list_range(char_u **str, int *num1, int *num2)
if (**str == ',') /* parse "to" part of range */
{
*str = skipwhite(*str + 1);
- vim_str2nr(*str, NULL, &len, 0, &num, NULL, 0);
+ vim_str2nr(*str, NULL, &len, 0, &num, NULL, 0, FALSE);
if (len > 0)
{
*num2 = (int)num;