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

Fix skipping plots in version >= 0.4.5.

This commit is contained in:
Bartosz Taudul 2019-03-15 15:27:37 +01:00
parent b43d962194
commit 5fbc14c487

View File

@ -878,7 +878,14 @@ Worker::Worker( FileRead& f, EventType::Type eventMask )
{
for( uint64_t i=0; i<sz; i++ )
{
f.Skip( sizeof( PlotData::name ) + sizeof( PlotData::min ) + sizeof( PlotData::max ) );
if( fileVer >= FileVersion( 0, 4, 5 ) )
{
f.Skip( sizeof( PlotData::name ) + sizeof( PlotData::min ) + sizeof( PlotData::max ) + sizeof( PlotData::type ) );
}
else
{
f.Skip( sizeof( PlotData::name ) + sizeof( PlotData::min ) + sizeof( PlotData::max ) );
}
uint64_t psz;
f.Read( psz );
f.Skip( psz * sizeof( PlotItem ) );