mirror of
https://github.com/HIllya51/LunaHook.git
synced 2024-12-24 04:04:14 +08:00
fix
This commit is contained in:
parent
fea96595c5
commit
67a17849e8
@ -532,8 +532,7 @@ namespace Private {
|
||||
}
|
||||
|
||||
// Convert to lower case
|
||||
std::string s = t;
|
||||
stolower(s);
|
||||
std::string s = stolower(std::string(t));
|
||||
t = s.c_str();
|
||||
|
||||
if (::strchr(t, '_')) {
|
||||
|
@ -66,8 +66,7 @@ std::optional<std::pair<std::wstring,LPVOID>> pluginmanager::checkisvalidplugin(
|
||||
auto path=std::filesystem::path(pl);
|
||||
if (!std::filesystem::exists(path))return{};
|
||||
if (!std::filesystem::is_regular_file(path))return{};
|
||||
auto appendix=path.extension().wstring();
|
||||
stolower(appendix);
|
||||
auto appendix=stolower(path.extension().wstring());
|
||||
if((appendix!=std::wstring(L".dll"))&&(appendix!=std::wstring(L".xdll")))return {};
|
||||
auto dll=LoadLibraryW(pl.c_str());
|
||||
if(!dll)return {};
|
||||
|
@ -4,7 +4,7 @@
|
||||
enum { VNR_TEXT_CAPACITY = 1500 }; // estimated max number of bytes allowed in VNR, slightly larger than VNR's text limit (1000)
|
||||
|
||||
template<class StringT>
|
||||
StringT& stolower(StringT& s){
|
||||
StringT stolower(StringT s){
|
||||
std::transform(s.begin(), s.end(), s.begin(), tolower);
|
||||
return s;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user