diff --git a/src/c_dispatch.cpp b/src/c_dispatch.cpp index b8e221e389..73d0d5d3e6 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