aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorludwig <ludwig@edf5b092-35ff-0310-97b2-ce42778d08ea>2008-03-24 21:20:49 +0000
committerludwig <ludwig@edf5b092-35ff-0310-97b2-ce42778d08ea>2008-03-24 21:20:49 +0000
commit000148b66c80c177a2491bfc8b979415166d1e75 (patch)
tree4228e4e2a7909d0c3a49005c96189133658f8ce8
parent41b0dc5ec81034cf85a2fb590830f6d13ca405e1 (diff)
downloadioquake3-aero-000148b66c80c177a2491bfc8b979415166d1e75.tar.gz
ioquake3-aero-000148b66c80c177a2491bfc8b979415166d1e75.zip
catch Cbuf_ExecuteText(EXEC_NOW,...) from the ui as that would crash the vm
git-svn-id: svn://svn.icculus.org/quake3/trunk@1273 edf5b092-35ff-0310-97b2-ce42778d08ea
-rw-r--r--code/client/cl_ui.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/code/client/cl_ui.c b/code/client/cl_ui.c
index 31b938a..dc8d66e 100644
--- a/code/client/cl_ui.c
+++ b/code/client/cl_ui.c
@@ -801,6 +801,12 @@ intptr_t CL_UISystemCalls( intptr_t *args ) {
return 0;
case UI_CMD_EXECUTETEXT:
+ if(args[1] == 0
+ && (!strncmp(VMA(2), "snd_restart", 11) || !strncmp(VMA(2), "vid_restart", 11)))
+ {
+ Com_Printf (S_COLOR_YELLOW "turning EXEC_NOW '%.11s' into EXEC_INSERT\n", (const char*)VMA(2));
+ args[1] = EXEC_INSERT;
+ }
Cbuf_ExecuteText( args[1], VMA(2) );
return 0;