diff --git a/nmap_error.cc b/nmap_error.cc index ff32d8a17..cb643a207 100644 --- a/nmap_error.cc +++ b/nmap_error.cc @@ -167,7 +167,7 @@ void pfatal(const char *err, ...) { log_write(o.log_errors? LOG_NORMAL|LOG_STDERR : LOG_STDERR, ": %s (%d)\n", strerror(errno), errno); #endif /* WIN32 perror() compatability switch */ - if (o.log_errors) log_flush(LOG_STDOUT); + if (o.log_errors) log_flush(LOG_NORMAL); fflush(stderr); exit(1); } @@ -204,7 +204,7 @@ void gh_perror(const char *err, ...) { log_write(o.log_errors? LOG_NORMAL|LOG_STDERR : LOG_STDERR, ": %s (%d)\n", strerror(errno), errno); #endif /* WIN32 perror() compatability switch */ - if (o.log_errors) log_flush(LOG_STDOUT); + if (o.log_errors) log_flush(LOG_NORMAL); fflush(stderr); return; }