Skip to content

Commit

Permalink
[#59] TrackEditor: Improvements and bugfixes (Part 66: Fixed determin…
Browse files Browse the repository at this point in the history
…ation of track end in CBitSequence)
  • Loading branch information
tomas-nestorovic committed Jan 17, 2022
1 parent 1014d14 commit 22ca2b0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Main/src/Image_TrackRW.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -611,8 +611,9 @@
CImage::CTrackReader::CBitSequence::CBitSequence(CTrackReader tr,TLogTime tFrom,const CTrackReader::TProfile &profileFrom, TLogTime tTo)
// ctor
: pBits(nullptr) , nBits(0) {
const TLogTime iwTimeDefaultHalf=tr.GetCurrentProfile().iwTimeDefault/2;
tr.SetCurrentTimeAndProfile( tFrom, profileFrom );
while (tr && tr.GetCurrentTime()<tTo)
while (tr && tr.GetCurrentTime()+iwTimeDefaultHalf<tTo)
tr.ReadBit(), nBits++;
pBits=(TBit *)::calloc( nBits+1, sizeof(TBit) ); // "+1" = auxiliary terminal Bit
tr.SetCurrentTimeAndProfile( tFrom, profileFrom );
Expand Down

0 comments on commit 22ca2b0

Please sign in to comment.