Prevent FrameIterator OOB Errors (#949)
This commit is contained in:
parent
a2246af121
commit
b7e252dfd6
@ -46,18 +46,13 @@ SafeFrameIterator::SafeFrameIterator(IFrameIterator *it)
|
|||||||
|
|
||||||
bool SafeFrameIterator::Done() const
|
bool SafeFrameIterator::Done() const
|
||||||
{
|
{
|
||||||
return current == frames.length();
|
return current >= frames.length();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SafeFrameIterator::Next()
|
bool SafeFrameIterator::Next()
|
||||||
{
|
|
||||||
if (!this->Done())
|
|
||||||
{
|
{
|
||||||
current++;
|
current++;
|
||||||
return true;
|
return !this->Done();
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SafeFrameIterator::Reset()
|
void SafeFrameIterator::Reset()
|
||||||
|
Loading…
Reference in New Issue
Block a user