mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
Prevent division by zero.
This commit is contained in:
parent
70818b49b9
commit
8b56dd5468
@ -3081,7 +3081,7 @@ void Worker::UpdateMbps( int64_t td )
|
|||||||
m_mbpsData.mbps.erase( m_mbpsData.mbps.begin() );
|
m_mbpsData.mbps.erase( m_mbpsData.mbps.begin() );
|
||||||
m_mbpsData.mbps.emplace_back( bytes / ( td * 125.f ) );
|
m_mbpsData.mbps.emplace_back( bytes / ( td * 125.f ) );
|
||||||
}
|
}
|
||||||
m_mbpsData.compRatio = float( bytes ) / decBytes;
|
m_mbpsData.compRatio = decBytes == 0 ? 1 : float( bytes ) / decBytes;
|
||||||
m_mbpsData.queue = m_serverQueryQueue.size();
|
m_mbpsData.queue = m_serverQueryQueue.size();
|
||||||
m_mbpsData.transferred += bytes;
|
m_mbpsData.transferred += bytes;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user