Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix current mod name change missed during rebase
  • Loading branch information
ShadowNinja committed May 17, 2015
1 parent 11a96e4 commit c00b681
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/script/lua_api/l_base.cpp
Expand Up @@ -49,12 +49,12 @@ GUIEngine *ModApiBase::getGuiEngine(lua_State *L)

std::string ModApiBase::getCurrentModPath(lua_State *L)
{
lua_getfield(L, LUA_REGISTRYINDEX, "current_modname");
const char *current_modname = lua_tostring(L, -1);
if (!current_modname)
lua_getfield(L, LUA_REGISTRYINDEX, SCRIPT_MOD_NAME_FIELD);
const char *current_mod_name = lua_tostring(L, -1);
if (!current_mod_name)
return ".";

const ModSpec *mod = getServer(L)->getModSpec(current_modname);
const ModSpec *mod = getServer(L)->getModSpec(current_mod_name);
if (!mod)
return ".";

Expand Down

0 comments on commit c00b681

Please sign in to comment.