fs: fix warning. fix size argument in report_fatal_error

This commit is contained in:
Megamouse 2024-01-20 13:02:00 +01:00
parent f19744ae88
commit 8edd7d54cf
2 changed files with 7 additions and 5 deletions

View file

@ -1906,8 +1906,9 @@ std::string fs::get_executable_path()
static const std::string s_exe_path = []
{
#if defined(_WIN32)
std::vector<wchar_t> buffer(32767);
GetModuleFileNameW(nullptr, buffer.data(), buffer.size());
constexpr DWORD size = 32767;
std::vector<wchar_t> buffer(size);
GetModuleFileNameW(nullptr, buffer.data(), size);
return wchar_to_utf8(buffer.data());
#elif defined(__APPLE__)
char bin_path[PATH_MAX];