From 4669a4fc9b27f3e67abf0164fba62157ac368947 Mon Sep 17 00:00:00 2001 From: rlauuzo <46294892+rlauuzo@users.noreply.github.com> Date: Wed, 1 May 2024 18:16:07 +0200 Subject: [PATCH] fix negative index --- .../Analyzers/ChapterAnalyzer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ConfusedPolarBear.Plugin.IntroSkipper/Analyzers/ChapterAnalyzer.cs b/ConfusedPolarBear.Plugin.IntroSkipper/Analyzers/ChapterAnalyzer.cs index 4536227..f8b3c5b 100644 --- a/ConfusedPolarBear.Plugin.IntroSkipper/Analyzers/ChapterAnalyzer.cs +++ b/ConfusedPolarBear.Plugin.IntroSkipper/Analyzers/ChapterAnalyzer.cs @@ -113,7 +113,7 @@ public class ChapterAnalyzer : IMediaFileAnalyzer }); // Check all chapters in reverse order, skipping the virtual chapter - for (int i = chapters.Count - 2; i >= 0; i--) + for (int i = chapters.Count - 2; i > 0; i--) { var current = chapters[i]; var previous = chapters[i - 1];