Skip to content

Commit

Permalink
fix lua stacktraces
Browse files Browse the repository at this point in the history
  • Loading branch information
gfgtdf committed Oct 24, 2014
1 parent 366df75 commit f126846
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/scripting/lua.cpp
Expand Up @@ -1113,8 +1113,10 @@ class lua_filestream
static int lua_loadfile(lua_State *L, const std::string& fname)
{
lua_filestream lfs(fname);
//lua uses '@' to know that this is a file (as opposed to a something as opposed to something loaded via loadstring )
std::string chunkname = '@' + fname;
LOG_LUA << "starting to read from " << fname << "\n";
return lua_load(L, &lua_filestream::lua_read_data, &lfs, fname.c_str(), NULL);
return lua_load(L, &lua_filestream::lua_read_data, &lfs, chunkname.c_str(), NULL);
}
private:
char buff_[LUAL_BUFFERSIZE];
Expand Down

0 comments on commit f126846

Please sign in to comment.