diff --git a/src/c_dispatch.cpp b/src/c_dispatch.cpp index b8e221e38..73d0d5d3e 100644 --- a/src/c_dispatch.cpp +++ b/src/c_dispatch.cpp @@ -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