diff options
| author | Maxime Coste <mawww@kakoune.org> | 2016-12-20 20:14:35 +0000 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2016-12-20 20:14:35 +0000 |
| commit | 0daf7af493fa7a2e3fb48144cce42a959c09ff35 (patch) | |
| tree | c8c76ddbe3da010eb719d43708ce07585d5b5420 /src/shell_manager.cc | |
| parent | c2305e03b39096a6a1113f40f322526f51d7b003 (diff) | |
Fix getting path confstr, the returned size includes the zero terminator
Closes #1047
Diffstat (limited to 'src/shell_manager.cc')
| -rw-r--r-- | src/shell_manager.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shell_manager.cc b/src/shell_manager.cc index f7857dab..f6623db3 100644 --- a/src/shell_manager.cc +++ b/src/shell_manager.cc @@ -25,7 +25,7 @@ ShellManager::ShellManager() // Get a guaranteed to be POSIX shell binary { auto size = confstr(_CS_PATH, 0, 0); - String path; path.resize(size, 0); + String path; path.resize(size-1, 0); confstr(_CS_PATH, path.data(), size); for (auto dir : StringView{path} | split<StringView>(':')) { |
