updated for version 7.3.577
Problem: Size of memory does not fit in 32 bit unsigned.
Solution: Use Kbyte instead of byte. Call GlobalMemoryStatusEx() instead of
GlobalMemoryStatus() when available.
diff --git a/src/option.c b/src/option.c
index 9acb270..308d7a8 100644
--- a/src/option.c
+++ b/src/option.c
@@ -3154,7 +3154,7 @@
{
#ifdef HAVE_AVAIL_MEM
/* Use amount of memory available at this moment. */
- n = (mch_avail_mem(FALSE) >> 11);
+ n = (mch_avail_mem(FALSE) >> 1);
#else
# ifdef HAVE_TOTAL_MEM
/* Use amount of memory available to Vim. */
@@ -6702,7 +6702,7 @@
{
for (s = *varp; *s;)
{
- while(*s == ',' || *s == ' ')
+ while (*s == ',' || *s == ' ')
s++;
if (!*s)
break;
@@ -7391,7 +7391,7 @@
new_unnamed |= CLIP_UNNAMED;
p += 7;
}
- else if (STRNCMP(p, "unnamedplus", 11) == 0
+ else if (STRNCMP(p, "unnamedplus", 11) == 0
&& (p[11] == ',' || p[11] == NUL))
{
new_unnamed |= CLIP_UNNAMED_PLUS;