This commit is contained in:
恍兮惚兮 2024-02-08 17:11:33 +08:00
parent fea96595c5
commit 67a17849e8
3 changed files with 3 additions and 5 deletions

View File

@ -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, '_')) {

View File

@ -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 {};

View File

@ -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;
}