mirror of
https://github.com/vim/vim.git
synced 2025-09-29 04:34:16 -04:00
patch 9.0.1380: CTRL-X on 2**64 subtracts two
Problem: CTRL-X on 2**64 subtracts two. (James McCoy) Solution: Correct computation for large number. (closes #12103)
This commit is contained in:
@@ -217,7 +217,7 @@ tv_get_bool_or_number_chk(typval_T *varp, int *denote, int want_bool)
|
||||
}
|
||||
if (varp->vval.v_string != NULL)
|
||||
vim_str2nr(varp->vval.v_string, NULL, NULL,
|
||||
STR2NR_ALL, &n, NULL, 0, FALSE);
|
||||
STR2NR_ALL, &n, NULL, 0, FALSE, NULL);
|
||||
return n;
|
||||
case VAR_LIST:
|
||||
emsg(_(e_using_list_as_number));
|
||||
@@ -2230,7 +2230,7 @@ eval_number(
|
||||
// decimal, hex or octal number
|
||||
vim_str2nr(*arg, NULL, &len, skip_quotes
|
||||
? STR2NR_NO_OCT + STR2NR_QUOTE
|
||||
: STR2NR_ALL, &n, NULL, 0, TRUE);
|
||||
: STR2NR_ALL, &n, NULL, 0, TRUE, NULL);
|
||||
if (len == 0)
|
||||
{
|
||||
if (evaluate)
|
||||
|
Reference in New Issue
Block a user