mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
fix a nasty varargs bug
This commit is contained in:
parent
70ec9848e7
commit
b2b1cf89f4
1 changed files with 6 additions and 11 deletions
|
@ -265,28 +265,23 @@ static void
|
|||
SV_Error (const char *error, va_list argptr)
|
||||
{
|
||||
static qboolean inerror = false;
|
||||
dstring_t *string;
|
||||
|
||||
if (inerror)
|
||||
return;
|
||||
|
||||
inerror = true;
|
||||
string = dstring_new ();
|
||||
dvsprintf (string, error, argptr);
|
||||
|
||||
Con_Printf ("%s\n", string->str);
|
||||
|
||||
if (sv_net_initialized) {
|
||||
dstring_t *string = dstring_new ();
|
||||
|
||||
dvsprintf (string, error, argptr);
|
||||
dstring_insertstr (string, 0, "server crashed: ");
|
||||
dstring_appendstr (string, "\n");
|
||||
SV_FinalMessage (string->str);
|
||||
dstring_delete (string);
|
||||
}
|
||||
|
||||
if (con_module) {
|
||||
con_module->functions->console->pC_Print (error, argptr);
|
||||
con_module->functions->console->pC_Print ("\n", argptr);
|
||||
} else {
|
||||
Sys_Print (stderr, error, argptr);
|
||||
}
|
||||
dstring_delete (string);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue