summaryrefslogtreecommitdiffstats
path: root/src/Bindings/PluginLua.cpp
diff options
context:
space:
mode:
authorLane Kolbly <lane@rscheme.org>2017-07-07 08:42:35 +0200
committerLukas Pioch <lukas@zgow.de>2017-07-07 08:42:35 +0200
commit10a3bd9d12bd1406955adfd5dc6e087fcd4d3b65 (patch)
tree091c40dd672bbe7fec58795ed4d41c80a59f279a /src/Bindings/PluginLua.cpp
parentcBlockInfo static initialisation (#3832) (diff)
downloadcuberite-10a3bd9d12bd1406955adfd5dc6e087fcd4d3b65.tar
cuberite-10a3bd9d12bd1406955adfd5dc6e087fcd4d3b65.tar.gz
cuberite-10a3bd9d12bd1406955adfd5dc6e087fcd4d3b65.tar.bz2
cuberite-10a3bd9d12bd1406955adfd5dc6e087fcd4d3b65.tar.lz
cuberite-10a3bd9d12bd1406955adfd5dc6e087fcd4d3b65.tar.xz
cuberite-10a3bd9d12bd1406955adfd5dc6e087fcd4d3b65.tar.zst
cuberite-10a3bd9d12bd1406955adfd5dc6e087fcd4d3b65.zip
Diffstat (limited to 'src/Bindings/PluginLua.cpp')
-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")
{