Fix an out of bounds array crash.
This commit is contained in:
1 parent
9099208b9f
commit
53c3bb45f8
1 file changed
+1
-1
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user