summaryrefslogtreecommitdiffstats
path: root/src/Bindings/PluginLua.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Bindings/PluginLua.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Bindings/PluginLua.cpp b/src/Bindings/PluginLua.cpp
index 7de1dbb78..e3aa63aa1 100644
--- a/src/Bindings/PluginLua.cpp
+++ b/src/Bindings/PluginLua.cpp
@@ -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")
{