Skip to content

Commit

Permalink
Lua API: Keep stack clean after gathering message dialog options
Browse files Browse the repository at this point in the history
  • Loading branch information
CelticMinstrel committed Oct 10, 2015
1 parent b68ea23 commit c12ccfa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/scripting/lua_gui2.cpp
Expand Up @@ -291,6 +291,7 @@ int show_message_dialog(lua_State *L, CVideo & video)
chosen_option = i - 1;
}
options.push_back(option);
lua_pop(L, 1);
}
lua_getfield(L, 2, "default");
if(lua_isnumber(L, -1)) {
Expand All @@ -302,6 +303,7 @@ int show_message_dialog(lua_State *L, CVideo & video)
}
chosen_option = i - 1;
}
lua_pop(L, 1);
}

const config& def_cfg = luaW_checkconfig(L, 1);
Expand Down

0 comments on commit c12ccfa

Please sign in to comment.