aboutsummaryrefslogtreecommitdiff
path: root/games/minimal/mods/default/textures/default_junglegrass.png
diff options
context:
space:
mode:
authorLoïc Blot <lblot@infopro-digital.com>2017-03-16 11:09:06 +0100
committerLoïc Blot <lblot@infopro-digital.com>2017-03-16 11:09:06 +0100
commitb52f3005c315da9e55ffa7f1cbd71f2b18c7ba7f (patch)
tree14994ce32908fa025101b68d6e3b6c34667dcd07 /games/minimal/mods/default/textures/default_junglegrass.png
parent40ce538aad9af8f7634c4ba7e9f12246fb23b31c (diff)
downloadminetest-b52f3005c315da9e55ffa7f1cbd71f2b18c7ba7f.tar.gz
minetest-b52f3005c315da9e55ffa7f1cbd71f2b18c7ba7f.tar.bz2
minetest-b52f3005c315da9e55ffa7f1cbd71f2b18c7ba7f.zip
Fix indentation problem since merge resolution
Github merge conflict resolution is not the best with indent
Diffstat (limited to 'games/minimal/mods/default/textures/default_junglegrass.png')
0 files changed, 0 insertions, 0 deletions
/a> 144 145 146 147 148
/*
Minetest
Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#include "common/c_internal.h"
#include "debug.h"

std::string script_get_backtrace(lua_State *L)
{
	std::string s;
	lua_getfield(L, LUA_GLOBALSINDEX, "debug");
	if(lua_istable(L, -1)){
		lua_getfield(L, -1, "traceback");
		if(lua_isfunction(L, -1)){
			lua_call(L, 0, 1);
			if(lua_isstring(L, -1)){
				s += lua_tostring(L, -1);
			}
			lua_pop(L, 1);
		}
		else{
			lua_pop(L, 1);
		}
	}
	lua_pop(L, 1);
	return s;
}