Skip to content

Commit

Permalink
Fix .lua file check
Browse files Browse the repository at this point in the history
  • Loading branch information
Sirius902 committed Aug 12, 2021
1 parent 3e3b400 commit abe46e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion LuaBackendLIB/source/LuaBackend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ void LuaBackend::LoadScripts(const char* ScrPath, uint64_t BaseInput)

string _filePath(_path.path().u8string());

if (_filePath.size() >= 4 && _filePath.find(".lua") == _filePath.size() - 4)
if (_path.path().extension() == ".lua")
{
string _luaName = _filePath.substr(_filePath.find_last_of("\\") + 1);
_script->luaState["LUA_NAME"] = _luaName.substr(0, _luaName.size() - 4);
Expand Down

0 comments on commit abe46e4

Please sign in to comment.