mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 05:19:56 +00:00
Windows: Fix buffer overflow on load.
This was causing headless to crash, not sure what it was doing otherwise.
This commit is contained in:
parent
6f58d4d30e
commit
c91f9f3a2c
@ -255,7 +255,7 @@ static std::string NormalizePath(const std::string &path) {
|
||||
#ifdef _WIN32
|
||||
wchar_t buf[512] = {0};
|
||||
std::wstring wpath = ConvertUTF8ToWString(path);
|
||||
if (GetFullPathName(wpath.c_str(), sizeof(buf) - 1, buf, NULL) == 0)
|
||||
if (GetFullPathName(wpath.c_str(), (int)ARRAY_SIZE(buf) - 1, buf, NULL) == 0)
|
||||
return "";
|
||||
return ConvertWStringToUTF8(buf);
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user