From 2b153267fb912c9c2e2f6a0908a04611e5f98ba0 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 1987ea9..9439216 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 next = chapters[i + 1];