r1273 - trunk/code/client

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Mon Mar 24 17:20:50 EDT 2008


Author: ludwig
Date: 2008-03-24 17:20:49 -0400 (Mon, 24 Mar 2008)
New Revision: 1273

Modified:
   trunk/code/client/cl_ui.c
Log:
catch Cbuf_ExecuteText(EXEC_NOW,...) from the ui as that would crash the vm


Modified: trunk/code/client/cl_ui.c
===================================================================
--- trunk/code/client/cl_ui.c	2008-03-17 16:47:40 UTC (rev 1272)
+++ trunk/code/client/cl_ui.c	2008-03-24 21:20:49 UTC (rev 1273)
@@ -801,6 +801,12 @@
 		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;
 




More information about the quake3-commits mailing list