mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-29 15:22:08 +00:00
Prohibited setting of non-mod CVARs from unsafe alias
This commit is contained in:
parent
f25a5ea2bc
commit
059e40e2d5
1 changed files with 6 additions and 0 deletions
|
@ -651,6 +651,12 @@ void C_DoCommand (const char *cmd, int keynum)
|
|||
|
||||
if (args.argc() >= 2)
|
||||
{ // Set the variable
|
||||
if (UnsafeExecutionContext && !(var->GetFlags() & CVAR_MOD))
|
||||
{
|
||||
Printf(TEXTCOLOR_RED "Cannot set console variable" TEXTCOLOR_GOLD " %s " TEXTCOLOR_RED "from unsafe command\n", var->GetName());
|
||||
return;
|
||||
}
|
||||
|
||||
var->CmdSet (args[1]);
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue