Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
TrentHouliston committed Aug 30, 2024
1 parent 990f33d commit 8e99498
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_util/executable_path.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ namespace test_util {
std::string get_executable_path() {
std::array<char, PATH_MAX> buffer{};
const ssize_t size = ::readlink("/proc/self/exe", buffer.data(), buffer.size());
if (size != -1) {
return {buffer.data(), size};
if (size >= 1) {
return {buffer.data(), size_t(size)};
}
throw std::system_error(std::make_error_code(std::errc::no_such_file_or_directory),
"Could not get executable path");
Expand Down

0 comments on commit 8e99498

Please sign in to comment.