mirror of
https://github.com/vim/vim.git
synced 2025-09-29 04:34:16 -04:00
patch 8.2.4363: MS-Windows: running out of memory for a very long line
Problem: MS-Windows: running out of memory for a very long line. Solution: Use a 32 bit value for MAXCOL also when ints are 64 bits.
This commit is contained in:
@@ -750,6 +750,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
4363,
|
||||
/**/
|
||||
4362,
|
||||
/**/
|
||||
|
@@ -1739,7 +1739,9 @@ typedef unsigned short disptick_T; // display tick type
|
||||
# define MAXCOL (0x3fffffffL) // maximum column number, 30 bits
|
||||
# define MAXLNUM (0x3fffffffL) // maximum (invalid) line number
|
||||
#else
|
||||
# define MAXCOL INT_MAX // maximum column number
|
||||
// MAXCOL used to be INT_MAX, but with 64 bit ints that results in running
|
||||
// out of memory when trying to allocate a very long line.
|
||||
# define MAXCOL 0x7fffffffL // maximum column number
|
||||
# define MAXLNUM LONG_MAX // maximum (invalid) line number
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user