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:
parent
a1ffba823e
commit
73a864c51c
2
main.c
2
main.c
@ -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
2
util.c
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user