1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Fix drawing of last frame.

This commit is contained in:
Bartosz Taudul
2018-08-04 23:19:35 +02:00
parent 3d75eb50bf
commit 6b8a3b25ba
2 changed files with 3 additions and 3 deletions
+3 -2
View File
@@ -889,8 +889,9 @@ int64_t Worker::GetFrameEnd( const FrameData& fd, size_t idx ) const
std::pair <int, int> Worker::GetFrameRange( const FrameData& fd, int64_t from, int64_t to )
{
const auto zitbegin = std::lower_bound( fd.frames.begin(), fd.frames.end(), from );
if( zitbegin == fd.frames.end() ) return std::make_pair( -1, -1 );
auto zitbegin = std::lower_bound( fd.frames.begin(), fd.frames.end(), from );
if( zitbegin == fd.frames.end() ) zitbegin--;
const auto zitend = std::lower_bound( zitbegin, fd.frames.end(), to );
int zbegin = std::distance( fd.frames.begin(), zitbegin );