mirror of https://github.com/axmolengine/axmol.git
[Lua] Passing full path to luaL_dofile in CCLuaEngine::executeScriptFile.
This commit is contained in:
parent
9739477881
commit
eb0358fda6
|
@ -191,8 +191,9 @@ int CCLuaStack::executeScriptFile(const char* filename)
|
||||||
code.append("\"");
|
code.append("\"");
|
||||||
return executeString(code.c_str());
|
return executeString(code.c_str());
|
||||||
#else
|
#else
|
||||||
|
std::string fullPath = CCFileUtils::sharedFileUtils()->fullPathForFilename(filename);
|
||||||
++m_callFromLua;
|
++m_callFromLua;
|
||||||
int nRet = luaL_dofile(m_state, filename);
|
int nRet = luaL_dofile(m_state, fullPath.c_str());
|
||||||
--m_callFromLua;
|
--m_callFromLua;
|
||||||
CC_ASSERT(m_callFromLua >= 0);
|
CC_ASSERT(m_callFromLua >= 0);
|
||||||
// lua_gc(m_state, LUA_GCCOLLECT, 0);
|
// lua_gc(m_state, LUA_GCCOLLECT, 0);
|
||||||
|
|
Loading…
Reference in New Issue