mirror of
https://github.com/neovim/neovim.git
synced 2025-10-04 00:46:30 +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:
@@ -580,7 +580,7 @@ void ex_sort(exarg_T *eap)
|
||||
}
|
||||
|
||||
if (sort_nr || sort_flt) {
|
||||
// Make sure vim_str2nr doesn't read any digits past the end
|
||||
// Make sure vim_str2nr() doesn't read any digits past the end
|
||||
// of the match, by temporarily terminating the string there
|
||||
s2 = s + end_col;
|
||||
c = *s2;
|
||||
@@ -605,7 +605,7 @@ void ex_sort(exarg_T *eap)
|
||||
} else {
|
||||
nrs[lnum - eap->line1].st_u.num.is_number = true;
|
||||
vim_str2nr(s, NULL, NULL, sort_what,
|
||||
&nrs[lnum - eap->line1].st_u.num.value, NULL, 0, false);
|
||||
&nrs[lnum - eap->line1].st_u.num.value, NULL, 0, false, NULL);
|
||||
}
|
||||
} else {
|
||||
s = skipwhite(p);
|
||||
|
Reference in New Issue
Block a user