mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-03 21:39:44 +00:00
Lua API: Keep stack clean after gathering message dialog options
This commit is contained in:
parent
b68ea239d5
commit
c12ccfa30b
@ -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)) {
|
||||
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user