Fixed a va_list corruption in logv_error()

This commit is contained in:
Clifford Wolf 2014-08-02 21:54:30 +02:00
parent 88cf00ce78
commit bc947d4c7b
1 changed files with 3 additions and 4 deletions

View File

@ -113,12 +113,11 @@ void logv_header(const char *format, va_list ap)
void logv_error(const char *format, va_list ap)
{
if (log_errfile != NULL)
log_files.push_back(log_errfile);
log("ERROR: ");
logv(format, ap);
if (log_errfile != NULL) {
fprintf(log_errfile, "ERROR: ");
vfprintf(log_errfile, format, ap);
}
log_flush();
exit(1);
}