1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-22 20:44:19 +00:00

vfprintf invalidates the va args so do it after the curses output.

This commit is contained in:
Con Kolivas 2011-07-11 21:56:34 +10:00
parent a1ffba823e
commit 73a864c51c
2 changed files with 2 additions and 2 deletions

2
main.c
View File

@ -601,7 +601,7 @@ void log_curses(const char *f, va_list ap)
if (unlikely(!curses_active))
return;
vwprintw(mainwin, f, ap);
vw_printw(mainwin, f, ap);
clrtoeol();
getyx(mainwin, logcursor, x);

2
util.c
View File

@ -90,12 +90,12 @@ void vapplog(int prio, const char *fmt, va_list ap)
tm.tm_min,
tm.tm_sec,
fmt);
log_curses(f, ap);
/* Only output to stderr if it's not going to the screen as well */
if (opt_log_output && !isatty(fileno((FILE *)stderr))) {
vfprintf(stderr, f, ap); /* atomic write to stderr */
fflush(stderr);
}
log_curses(f, ap);
}
}