mirror of
https://github.com/neovim/neovim.git
synced 2025-09-11 13:58:18 +00:00
vim-patch:9.0.1380: CTRL-X on 2**64 subtracts two (#22530)
Problem: CTRL-X on 2**64 subtracts two. (James McCoy)
Solution: Correct computation for large number. (closes vim/vim#12103)
5fb78c3fa5
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
@@ -8033,7 +8033,7 @@ static void f_str2nr(typval_T *argvars, typval_T *rettv, EvalFuncData fptr)
|
||||
break;
|
||||
}
|
||||
varnumber_T n;
|
||||
vim_str2nr(p, NULL, NULL, what, &n, NULL, 0, false);
|
||||
vim_str2nr(p, NULL, NULL, what, &n, NULL, 0, false, NULL);
|
||||
// Text after the number is silently ignored.
|
||||
if (isneg) {
|
||||
rettv->vval.v_number = -n;
|
||||
|
Reference in New Issue
Block a user