diff --git a/MP42/MP42VobSubImporter.m b/MP42/MP42VobSubImporter.m index af51c99..5f76336 100644 --- a/MP42/MP42VobSubImporter.m +++ b/MP42/MP42VobSubImporter.m @@ -334,7 +334,7 @@ static NSArray* LoadVobSubSubtitles(NSURL *theDirectory, NSString *filename) uint32_t endTime = currentSample->timeStamp + endTimestamp; int duration = endTimestamp - startTimestamp; - if(duration <= 0 && i <= sampleCount - 1) { + if(duration <= 0 && i < sampleCount - 1) { //Sample with no end duration, use the duration of the next one endTime = ((SBVobSubSample *)[vobTrack->samples objectAtIndex:i+1])->timeStamp; duration = endTime - startTime;