diff options
author | Lane Kolbly <lane@rscheme.org> | 2017-07-07 08:42:35 +0200 |
---|---|---|
committer | Lukas Pioch <lukas@zgow.de> | 2017-07-07 08:42:35 +0200 |
commit | 10a3bd9d12bd1406955adfd5dc6e087fcd4d3b65 (patch) | |
tree | 091c40dd672bbe7fec58795ed4d41c80a59f279a /src/Bindings/PluginLua.cpp | |
parent | cBlockInfo static initialisation (#3832) (diff) | |
download | cuberite-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 '')
-rw-r--r-- | src/Bindings/PluginLua.cpp | 3 |
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") { |