mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-29 15:22:08 +00:00
- fixed: OptionMenuItemSafeCommand did not allow unsafe commands.
This commit is contained in:
parent
3e8395ddaf
commit
f48e0280d8
1 changed files with 2 additions and 1 deletions
|
@ -179,7 +179,7 @@ class OptionMenuItemCommand : OptionMenuItemSubmenu
|
||||||
|
|
||||||
override bool Activate()
|
override bool Activate()
|
||||||
{
|
{
|
||||||
// This needs to perform a few checks to prevent abuse by malicious modders.
|
// This needs to perform a few checks to prevent abuse by malicious modders.
|
||||||
if (GetClass() != "OptionMenuItemSafeCommand")
|
if (GetClass() != "OptionMenuItemSafeCommand")
|
||||||
{
|
{
|
||||||
let m = OptionMenu(Menu.GetCurrentMenu());
|
let m = OptionMenu(Menu.GetCurrentMenu());
|
||||||
|
@ -188,6 +188,7 @@ class OptionMenuItemCommand : OptionMenuItemSubmenu
|
||||||
// don't execute if this item cannot be found in the current menu.
|
// don't execute if this item cannot be found in the current menu.
|
||||||
if (m.GetItem(mAction) != self) return false;
|
if (m.GetItem(mAction) != self) return false;
|
||||||
}
|
}
|
||||||
|
else mUnsafe = false;
|
||||||
Menu.MenuSound("menu/choose");
|
Menu.MenuSound("menu/choose");
|
||||||
DoCommand(ccmd, mUnsafe);
|
DoCommand(ccmd, mUnsafe);
|
||||||
if (mCloseOnSelect)
|
if (mCloseOnSelect)
|
||||||
|
|
Loading…
Reference in a new issue