1
0
forked from aniani/vim

updated for version 7.4b.012

Problem:    Output from a shell command is truncated at a NUL. (lcd 47)
Solution:   Change every NUL into an SOH.
This commit is contained in:
Bram Moolenaar
2013-08-03 14:10:50 +02:00
parent c528b1d1ed
commit fb332a2b33
2 changed files with 9 additions and 0 deletions

View File

@@ -10887,7 +10887,14 @@ get_cmd_output(cmd, infile, flags)
buffer = NULL; buffer = NULL;
} }
else else
{
/* Change NUL into SOH, otherwise the string is truncated. */
for (i = 0; i < len; ++i)
if (buffer[len] == NUL)
buffer[len] = 1;
buffer[len] = NUL; /* make sure the buffer is terminated */ buffer[len] = NUL; /* make sure the buffer is terminated */
}
done: done:
vim_free(tempname); vim_free(tempname);

View File

@@ -727,6 +727,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
12,
/**/ /**/
11, 11,
/**/ /**/