mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-17 08:11:51 +00:00
fs: fix warning. fix size argument in report_fatal_error
This commit is contained in:
parent
f19744ae88
commit
8edd7d54cf
@ -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];
|
||||
|
@ -187,10 +187,11 @@ LOG_CHANNEL(q_debug, "QDEBUG");
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
wchar_t buffer[32767];
|
||||
GetModuleFileNameW(nullptr, buffer, sizeof(buffer) / 2);
|
||||
constexpr DWORD size = 32767;
|
||||
std::vector<wchar_t> buffer(size);
|
||||
GetModuleFileNameW(nullptr, buffer.data(), size);
|
||||
const std::wstring arg(text.cbegin(), text.cend()); // ignore unicode for now
|
||||
_wspawnl(_P_WAIT, buffer, buffer, L"--error", arg.c_str(), nullptr);
|
||||
_wspawnl(_P_WAIT, buffer.data(), buffer.data(), L"--error", arg.c_str(), nullptr);
|
||||
#else
|
||||
pid_t pid;
|
||||
std::vector<char> data(text.data(), text.data() + text.size() + 1);
|
||||
|
Loading…
Reference in New Issue
Block a user