Commit 7207d0c2 authored by Gauthier Quesnel's avatar Gauthier Quesnel
Browse files

dialog: fix linux integer convertion

parent 7b2b3be9
......@@ -83,11 +83,13 @@ std::optional<std::filesystem::path>
get_executable_directory()
{
std::vector<char> buf(PATH_MAX, '\0');
const auto size = readlink("/proc/self/exe", buf.data(), PATH_MAX);
const auto ssize = readlink("/proc/self/exe", buf.data(), PATH_MAX);
if (size <= 0)
if (ssize <= 0)
return std::nullopt;
const auto size = static_cast<size_t>(ssize);
return std::filesystem::path{ std::string_view{ buf.data(), size } };
}
#elif defined(__APPLE__)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment