From 000148b66c80c177a2491bfc8b979415166d1e75 Mon Sep 17 00:00:00 2001 From: ludwig Date: Mon, 24 Mar 2008 21:20:49 +0000 Subject: 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 --- code/client/cl_ui.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'code') 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; -- cgit v1.2.3