mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Fix system() output truncation bug.
Replace NULs with SOH to restore the old behaviour of get_cmd_output().
This commit is contained in:
parent
44b187dd01
commit
3928acb032
@ -14480,6 +14480,9 @@ static void get_system_output_as_rettv(typval_T *argvars, typval_T *rettv,
|
||||
|
||||
free(res);
|
||||
} else {
|
||||
// res may contain several NULs before the final terminating one.
|
||||
// Replace them with SOH (1) like in get_cmd_output() to avoid truncation.
|
||||
memchrsub(res, NUL, 1, nread);
|
||||
#ifdef USE_CRNL
|
||||
// translate <CR><NL> into <NL>
|
||||
char *d = res;
|
||||
|
Loading…
Reference in New Issue
Block a user