mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -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:
@@ -1188,7 +1188,7 @@ f_str2nr(typval_T *argvars, typval_T *rettv)
|
||||
case 8: what |= STR2NR_OCT + STR2NR_OOCT + STR2NR_FORCE; break;
|
||||
case 16: what |= STR2NR_HEX + STR2NR_FORCE; break;
|
||||
}
|
||||
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