aboutsummaryrefslogtreecommitdiff
path: root/src/script
diff options
context:
space:
mode:
authorkwolekr <kwolekr@minetest.net>2014-10-30 16:23:48 -0400
committerkwolekr <kwolekr@minetest.net>2014-10-30 16:23:48 -0400
commitdb25f753375a97c71609ec4e2a3f7f6983904a54 (patch)
treeb4053c471564e8d4aad26ae1e95757676293965f /src/script
parentf0ae2da89e0c549b7551227069456c8a474f6d90 (diff)
downloadminetest-db25f753375a97c71609ec4e2a3f7f6983904a54.tar.gz
minetest-db25f753375a97c71609ec4e2a3f7f6983904a54.tar.bz2
minetest-db25f753375a97c71609ec4e2a3f7f6983904a54.zip
Fix erroneous lua_pop parameter
Diffstat (limited to 'src/script')
-rw-r--r--src/script/lua_api/l_mapgen.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/script/lua_api/l_mapgen.cpp b/src/script/lua_api/l_mapgen.cpp
index 75f5afa88..fdbeafb31 100644
--- a/src/script/lua_api/l_mapgen.cpp
+++ b/src/script/lua_api/l_mapgen.cpp
@@ -475,9 +475,11 @@ bool ModApiMapgen::regDecoSchematic(lua_State *L,
lua_pop(L, 1);
lua_getfield(L, index, "schematic");
- if (!read_schematic(L, -1, deco, getServer(L)))
+ if (!read_schematic(L, -1, deco, getServer(L))) {
+ lua_pop(L, 1);
return false;
- lua_pop(L, -1);
+ }
+ lua_pop(L, 1);
if (!deco->filename.empty() &&
!deco->loadSchematicFile(resolver, replace_names)) {