mirror of
https://github.com/neovim/neovim.git
synced 2025-09-07 03:48: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:
@@ -376,7 +376,7 @@ LexExprToken viml_pexpr_next_token(ParserState *const pstate, const int flags)
|
||||
}
|
||||
if (exp_start) {
|
||||
vim_str2nr(pline.data + exp_start, NULL, NULL, 0, NULL, &exp_part,
|
||||
(int)(ret.len - exp_start), false);
|
||||
(int)(ret.len - exp_start), false, NULL);
|
||||
}
|
||||
if (exp_negative) {
|
||||
exp_part += frac_size;
|
||||
@@ -394,7 +394,7 @@ LexExprToken viml_pexpr_next_token(ParserState *const pstate, const int flags)
|
||||
int len;
|
||||
int prep;
|
||||
vim_str2nr(pline.data, &prep, &len, STR2NR_ALL, NULL,
|
||||
&ret.data.num.val.integer, (int)pline.size, false);
|
||||
&ret.data.num.val.integer, (int)pline.size, false, NULL);
|
||||
ret.len = (size_t)len;
|
||||
const uint8_t bases[] = {
|
||||
[0] = 10,
|
||||
|
Reference in New Issue
Block a user