Skip to content

Commit

Permalink
Fix erroneous lua_pop parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
kwolekr committed Oct 30, 2014
1 parent f0ae2da commit db25f75
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/script/lua_api/l_mapgen.cpp
Expand Up @@ -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)) {
Expand Down

0 comments on commit db25f75

Please sign in to comment.