mirror of
https://github.com/xmrig/xmrig.git
synced 2025-03-24 08:08:58 +00:00
Fix log.
This commit is contained in:
parent
3f1eefb131
commit
9cb43f9883
1 changed files with 2 additions and 2 deletions
|
@ -93,12 +93,12 @@ public:
|
||||||
timestamp(level, size, offset);
|
timestamp(level, size, offset);
|
||||||
color(level, size);
|
color(level, size);
|
||||||
|
|
||||||
int rc = vsnprintf(m_buf + size, sizeof (m_buf) - offset - 32, fmt, args);
|
const int rc = vsnprintf(m_buf + size, sizeof (m_buf) - offset - 32, fmt, args);
|
||||||
if (rc < 0) {
|
if (rc < 0) {
|
||||||
return unlock();
|
return unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
size += static_cast<size_t>(rc);
|
size += std::min(static_cast<size_t>(rc), sizeof (m_buf) - offset - 32);
|
||||||
endl(size);
|
endl(size);
|
||||||
|
|
||||||
std::string txt(m_buf);
|
std::string txt(m_buf);
|
||||||
|
|
Loading…
Reference in a new issue