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.
diff --git a/src/indent.c b/src/indent.c
index 3148495..95fc74e 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -1726,7 +1726,7 @@
len = num_spaces + num_tabs;
old_len = (long)STRLEN(ptr);
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;
diff --git a/src/version.c b/src/version.c
index 18f7892..ea5119c 100644
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 4364,
+/**/
4363,
/**/
4362,