diff options
author | Clifford Wolf <clifford@clifford.at> | 2014-08-02 21:54:30 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2014-08-02 21:54:30 +0200 |
commit | bc947d4c7b9b7691e2aeab608c78c4658314cec2 (patch) | |
tree | 87b003349626e0201996a5f28b02ec0bc26110ad /kernel | |
parent | 88cf00ce7874ec7951b09d85e959dd2c6ed261b6 (diff) | |
download | yosys-bc947d4c7b9b7691e2aeab608c78c4658314cec2.tar.gz yosys-bc947d4c7b9b7691e2aeab608c78c4658314cec2.tar.bz2 yosys-bc947d4c7b9b7691e2aeab608c78c4658314cec2.zip |
Fixed a va_list corruption in logv_error()
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/log.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/kernel/log.cc b/kernel/log.cc index 81cc26da3..09673dc2e 100644 --- a/kernel/log.cc +++ b/kernel/log.cc @@ -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); } |