0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -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:
Bram Moolenaar
2023-03-04 20:47:39 +00:00
parent 5284b23e14
commit 5fb78c3fa5
12 changed files with 69 additions and 21 deletions

View File

@@ -2157,7 +2157,7 @@ do_set_option_numeric(
else if (*arg == '-' || VIM_ISDIGIT(*arg))
{
// Allow negative (for 'undolevels'), octal and hex numbers.
vim_str2nr(arg, NULL, &i, STR2NR_ALL, &value, NULL, 0, TRUE);
vim_str2nr(arg, NULL, &i, STR2NR_ALL, &value, NULL, 0, TRUE, NULL);
if (i == 0 || (arg[i] != NUL && !VIM_ISWHITE(arg[i])))
{
errmsg = e_number_required_after_equal;