Skip to content

Commit 4af5f84

Browse files
committed
exepath: BSD: drop \0
1 parent 3e4139c commit 4af5f84

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/extra/exepath.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ std::string fs_exe_path()
7373
std::size_t L = path.size();
7474
const int mib[4] = {CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1};
7575
if(sysctl(mib, 4, path.data(), &L, nullptr, 0) == 0) {
76-
path.resize(L);
76+
path.resize(L-1);
7777
return path;
7878
}
7979
#else

0 commit comments

Comments
 (0)