mirror of
https://github.com/neovim/neovim.git
synced 2025-10-15 22:36:09 +00:00
Fix is_executable_in_path() on Windows (#10468)
* Fix problem that 1byte extra memory was allocated in is_executable_in_path
* Revert "Revert "tests: executable_spec: enable pending test #10443" (#10454)"
This reverts commit 13fbeda0e5
.
This commit is contained in:
@@ -364,7 +364,7 @@ static bool is_executable_in_path(const char_u *name, char_u **abspath)
|
||||
#ifdef WIN32
|
||||
// Prepend ".;" to $PATH.
|
||||
size_t pathlen = strlen(path_env);
|
||||
char *path = memcpy(xmallocz(pathlen + 3), "." ENV_SEPSTR, 2);
|
||||
char *path = memcpy(xmallocz(pathlen + 2), "." ENV_SEPSTR, 2);
|
||||
memcpy(path + 2, path_env, pathlen);
|
||||
#else
|
||||
char *path = xstrdup(path_env);
|
||||
|
Reference in New Issue
Block a user