Fix ArrayIndexOutOfBounds

This commit is contained in:
cvium 2021-05-16 20:16:47 +02:00
parent be4aeb5c2c
commit 81ac11828b

View File

@ -108,7 +108,7 @@ namespace MediaBrowser.Providers.MediaInfo
Path = fullName
};
}
else if (fileNameWithoutExtension.Length >= videoFileNameWithoutExtension.Length
else if (fileNameWithoutExtension.Length > videoFileNameWithoutExtension.Length
&& fileNameWithoutExtension[videoFileNameWithoutExtension.Length] == '.'
&& fileNameWithoutExtension.StartsWith(videoFileNameWithoutExtension, StringComparison.OrdinalIgnoreCase))
{