mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-12-01 08:31:14 +00:00
- fixed: SafeCommand did not work anymore because it failed the abuse prevention check for DoCommand.
This commit is contained in:
parent
224219dd66
commit
d5772ff895
1 changed files with 8 additions and 5 deletions
|
@ -132,11 +132,14 @@ 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.
|
||||||
let m = OptionMenu(Menu.GetCurrentMenu());
|
if (GetClass() != "OptionMenuItemSafeCommand")
|
||||||
// don't execute if no menu is active
|
{
|
||||||
if (m == null) return false;
|
let m = OptionMenu(Menu.GetCurrentMenu());
|
||||||
// don't execute if this item cannot be found in the current menu.
|
// don't execute if no menu is active
|
||||||
if (m.GetItem(mAction) != self) return false;
|
if (m == null) return false;
|
||||||
|
// don't execute if this item cannot be found in the current menu.
|
||||||
|
if (m.GetItem(mAction) != self) return false;
|
||||||
|
}
|
||||||
Menu.MenuSound("menu/choose");
|
Menu.MenuSound("menu/choose");
|
||||||
DoCommand(mAction);
|
DoCommand(mAction);
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue