mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:8.2.4364: MS-Windows: still running out of memory for a very long line
Problem: MS-Windows: still running out of memory for a very long line.
Solution: Check for negative length.
4549166078
This commit is contained in:
parent
72e3d2c9ba
commit
5c62bce7c1
@ -815,7 +815,7 @@ void ex_retab(exarg_T *eap)
|
||||
len = num_spaces + num_tabs;
|
||||
old_len = (long)STRLEN(ptr);
|
||||
const long new_len = old_len - col + start_col + len + 1;
|
||||
if (new_len >= MAXCOL) {
|
||||
if (new_len <= 0 || new_len >= MAXCOL) {
|
||||
emsg(_(e_resulting_text_too_long));
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user