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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user