mirror of
https://github.com/GOSTSec/sgminer
synced 2025-02-02 10:04:33 +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))
|
if (unlikely(!curses_active))
|
||||||
return;
|
return;
|
||||||
vwprintw(mainwin, f, ap);
|
vw_printw(mainwin, f, ap);
|
||||||
clrtoeol();
|
clrtoeol();
|
||||||
getyx(mainwin, logcursor, x);
|
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_min,
|
||||||
tm.tm_sec,
|
tm.tm_sec,
|
||||||
fmt);
|
fmt);
|
||||||
|
log_curses(f, ap);
|
||||||
/* Only output to stderr if it's not going to the screen as well */
|
/* Only output to stderr if it's not going to the screen as well */
|
||||||
if (opt_log_output && !isatty(fileno((FILE *)stderr))) {
|
if (opt_log_output && !isatty(fileno((FILE *)stderr))) {
|
||||||
vfprintf(stderr, f, ap); /* atomic write to stderr */
|
vfprintf(stderr, f, ap); /* atomic write to stderr */
|
||||||
fflush(stderr);
|
fflush(stderr);
|
||||||
}
|
}
|
||||||
log_curses(f, ap);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user