From c20370c47f06b0da27f27662fb376da741c17bb0 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 5979093..d479eeb 100644 --- a/ConfusedPolarBear.Plugin.IntroSkipper/Analyzers/ChapterAnalyzer.cs +++ b/ConfusedPolarBear.Plugin.IntroSkipper/Analyzers/ChapterAnalyzer.cs @@ -112,7 +112,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];