mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-30 16:01:49 +00:00
- fixed permission validation in OptionMenuItemCommand.DoCommand.
This was missing the InMenu check like the other critical menu functions.
This commit is contained in:
parent
dc7ba3778d
commit
b3fd8ce12a
1 changed files with 7 additions and 1 deletions
|
@ -964,10 +964,16 @@ DEFINE_ACTION_FUNCTION(FKeyBindings, UnbindACommand)
|
|||
// This is only accessible to the special menu item to run CCMDs.
|
||||
DEFINE_ACTION_FUNCTION(DOptionMenuItemCommand, DoCommand)
|
||||
{
|
||||
if (CurrentMenu == nullptr) return 0;
|
||||
PARAM_PROLOGUE;
|
||||
PARAM_STRING(cmd);
|
||||
PARAM_BOOL(unsafe);
|
||||
|
||||
// Only menus are allowed to execute CCMDs.
|
||||
if (DMenu::InMenu == 0)
|
||||
{
|
||||
I_FatalError("Attempt to execute CCMD '%s' outside of menu code", cmd.GetChars());
|
||||
}
|
||||
|
||||
UnsafeExecutionScope scope(unsafe);
|
||||
C_DoCommand(cmd);
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue