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:
zeertzjq
2023-03-05 09:18:42 +08:00
committed by GitHub
parent b44b8e7687
commit 419819b624
13 changed files with 48 additions and 19 deletions

View File

@@ -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;