mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -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:
@@ -511,7 +511,7 @@ 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;
|
||||
@@ -539,7 +539,7 @@ ex_sort(exarg_T *eap)
|
||||
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);
|
||||
NULL, 0, FALSE, NULL);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user