ensure ucmd_unkown and sv_cbuf->unkown_command always point somewhere sane

This commit is contained in:
Bill Currie 2004-01-06 23:04:14 +00:00
parent d1b4c5df72
commit 89e6b8b2e6
2 changed files with 6 additions and 3 deletions

View file

@ -552,6 +552,9 @@ qwe_load (progs_t * pr)
if (f)
*qwe_func_list[i].field = (func_t) (f - pr->pr_functions);
}
sv_cbuf->unknown_command = qwe_console_cmd;
ucmd_unknown = qwe_user_cmd;
return 1;
}
@ -560,7 +563,4 @@ SV_PR_QWE_Init (progs_t *pr)
{
PR_RegisterBuiltins (pr, builtins);
PR_AddLoadFunc (pr, qwe_load);
sv_cbuf->unknown_command = qwe_console_cmd;
ucmd_unknown = qwe_user_cmd;
}

View file

@ -184,6 +184,9 @@ SV_LoadProgs (void)
memset (&sv_funcs, 0, sizeof (sv_funcs));
sv_cbuf->unknown_command = 0;
ucmd_unknown = 0;
if (strequal (sv_progs_ext->string, "qf")) {
sv_range = PR_RANGE_QF;
range = "QF";