Eluna Fix Print functions

This commit is contained in:
Rochet2
2014-12-16 01:54:12 +02:00
parent 662babc806
commit f819245308

View File

@@ -2283,8 +2283,12 @@ namespace LuaGlobalFunctions
std::string GetStackAsString(lua_State* L) std::string GetStackAsString(lua_State* L)
{ {
std::ostringstream oss; std::ostringstream oss;
for (int i = 1; i <= lua_gettop(L); ++i) int top = lua_gettop(L);
for (int i = 1; i <= top; ++i)
{
oss << luaL_tolstring(L, i, NULL); oss << luaL_tolstring(L, i, NULL);
lua_pop(L, 1);
}
return oss.str(); return oss.str();
} }