Problem: ":so" command may read after end of buffer.
Solution: Compute length of text properly.
break;
buf = (char_u *)ga.ga_data;
buf[ga.ga_len++] = NUL;
+ len = ga.ga_len;
}
else
{
if (fgets((char *)buf + ga.ga_len, ga.ga_maxlen - ga.ga_len,
sp->fp) == NULL)
break;
+ len = ga.ga_len + (int)STRLEN(buf + ga.ga_len);
}
- len = ga.ga_len + (int)STRLEN(buf + ga.ga_len);
#ifdef USE_CRNL
// Ignore a trailing CTRL-Z, when in Dos mode. Only recognize the
// CTRL-Z by its own, or after a NL.
norm300gr0
so
bwipe!
+
+ let lines =<< trim END
+ new
+ norm 10a0000000000ΓΈ00000000000
+ norm i0000000000000000000
+ silent! so
+ END
+ call writefile(lines, 'Xtest.vim')
+ source Xtest.vim
+ bwipe!
+ call delete('Xtest.vim')
endfunc
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 4974,
/**/
4973,
/**/