diff --git a/SporeModLoader/SporeModLoaderHelpers.cpp b/SporeModLoader/SporeModLoaderHelpers.cpp index 3a0d6fc..3998a31 100644 --- a/SporeModLoader/SporeModLoaderHelpers.cpp +++ b/SporeModLoader/SporeModLoaderHelpers.cpp @@ -139,7 +139,8 @@ std::vector Path::GetModLibsPaths(void) #ifdef __cpp_lib_starts_ends_with if (filename.ends_with(postfix)) #else // C++17 - if (filename.find(postfix) != std::wstring::npos) + if (filename.size() >= postfix.size() && + filename.find(postfix, filename.size() - postfix.size()) != std::wstring::npos) #endif { skipLib = true;