mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-17 08:11:51 +00:00
Case-insensitive path compare for module verifier (#15889)
This commit is contained in:
parent
a1dcf1f717
commit
4030193f31
@ -8,6 +8,7 @@
|
||||
#endif
|
||||
|
||||
#include <Windows.h>
|
||||
#include <Shlwapi.h>
|
||||
|
||||
#include <util/types.hpp>
|
||||
#include <util/logs.hpp>
|
||||
@ -41,8 +42,6 @@ void WIN32_module_verifier::run_module_verification()
|
||||
report_fatal_error(fmt::format("WIN32_module_verifier: Failed to query WindowsDirectory"), false, true);
|
||||
}
|
||||
|
||||
const std::wstring_view windir_wsv = windir;
|
||||
|
||||
for (const auto& module : special_module_infos)
|
||||
{
|
||||
const HMODULE hModule = GetModuleHandle(module.name.data());
|
||||
@ -54,8 +53,7 @@ void WIN32_module_verifier::run_module_verification()
|
||||
WCHAR wpath[MAX_PATH];
|
||||
if (const auto len = GetModuleFileName(hModule, wpath, MAX_PATH))
|
||||
{
|
||||
const std::wstring_view path_wsv = wpath;
|
||||
if (path_wsv.find(windir_wsv) != 0)
|
||||
if (::StrStrI(wpath, windir) != wpath)
|
||||
{
|
||||
const std::string path = wchar_to_utf8(wpath);
|
||||
const std::string win_path = wchar_to_utf8(windir);
|
||||
|
Loading…
Reference in New Issue
Block a user