make certain Cmd_ExecuteString calls the command system with an active cbuf

This commit is contained in:
Bill Currie 2003-11-25 02:47:05 +00:00
parent cd8035319d
commit cb7ecd9f26
1 changed files with 5 additions and 0 deletions

View File

@ -609,9 +609,14 @@ Cmd_Init (void)
int
Cmd_ExecuteString (const char *text, cmd_source_t src)
{
cbuf_t *old = cbuf_active;
cbuf_active = cmd_cbuf;
cmd_source = src;
COM_TokenizeString (text, cmd_cbuf->args);
Cmd_Command (cmd_cbuf->args);
cbuf_active = old;
return 0;
}