1
0
Fork 0

Changed Lua plugins to only execute files ending in .lua (#3831)

This commit is contained in:
Lane Kolbly 2017-07-07 01:42:35 -05:00 committed by Lukas Pioch
parent d838ef7ba4
commit 10a3bd9d12
1 changed files with 2 additions and 1 deletions

View File

@ -113,7 +113,8 @@ bool cPluginLua::Load(void)
bool HasInfoLua = false;
for (AStringVector::const_iterator itr = Files.begin(), end = Files.end(); itr != end; ++itr)
{
if (itr->rfind(".lua") != AString::npos)
size_t ExtensionStart = itr->find_last_of('.');
if ((ExtensionStart != std::string::npos) && (itr->substr(ExtensionStart) == ".lua"))
{
if (*itr == "Info.lua")
{