Permalink
Browse files

Prevent FrameIterator OOB Errors (#949)

  • Loading branch information...
Headline committed Jan 13, 2019
1 parent 95027e0 commit 266532f18c3910273edacfd6f605f40574618326
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 266532f

Please sign in to comment.