Permalink
Browse files

Prevent FrameIterator OOB Errors (#949)

  • Loading branch information...
Headline committed Jan 13, 2019
1 parent a2246af commit b7e252dfd6fb8a8760325eb382be548639d4f700
Showing with 3 additions and 8 deletions.
  1. +3 −8 core/logic/FrameIterator.cpp
@@ -46,18 +46,13 @@ SafeFrameIterator::SafeFrameIterator(IFrameIterator *it)

bool SafeFrameIterator::Done() const
{
return current == frames.length();
return current >= frames.length();
}

bool SafeFrameIterator::Next()
{
if (!this->Done())
{
current++;
return true;
}

return false;
current++;
return !this->Done();
}

void SafeFrameIterator::Reset()

0 comments on commit b7e252d

Please sign in to comment.