We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 68b9060 commit c1f86f3Copy full SHA for c1f86f3
1 file changed
Sources/Overload/OvTools/src/OvTools/Utils/SystemCalls.cpp
@@ -45,7 +45,7 @@ std::string OvTools::Utils::SystemCalls::GetPathToAppdata()
45
// Convert app-data path from wide char to UTF-8 string
46
const int size_needed = WideCharToMultiByte(CP_UTF8, 0, path.get(), -1, nullptr, 0, nullptr, nullptr);
47
assert(size_needed > 0 && "failed to convert from wide char to UTF-8");
48
- std::string appDataPath(size_needed, 0);
+ std::string appDataPath(size_needed - 1, 0);
49
WideCharToMultiByte(CP_UTF8, 0, path.get(), -1, &appDataPath[0], size_needed, nullptr, nullptr);
50
return appDataPath;
51
}
0 commit comments