diff --git a/Changelog.txt b/Changelog.txt index 898d26a1b0..2466ce0c5e 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -39,6 +39,7 @@ * Ctrl+A not working in subtitle duration field - thx rRobis * Allow reading Matroska files with ".mp4" extension * Up max byte size for auto-translate server calls to 128K - thx despairTK + * Make auto-translate setting resizable + a little larger - thx gjaskula * FIXED: * Fix for nulling time code after load of sub from mkv * Fix crash in TTS re-generate - thx cvrle77 @@ -57,6 +58,8 @@ * Fix wrong timestamp (rounding) for format "CSV" - thx MariaB99 * Fix LRC with milliseconds issue - thx AverageHoarder * Fix crash trying to get subtitles from mp4 - thx nounours18200 + * Fix crash in split - thx Leon + * Fix for ffprobe and HDR10 - thx warrentc3 4.0.8 (6th September 2024) diff --git a/src/ui/Forms/Main.cs b/src/ui/Forms/Main.cs index b663ff7da8..8418659f4f 100644 --- a/src/ui/Forms/Main.cs +++ b/src/ui/Forms/Main.cs @@ -12181,8 +12181,9 @@ private void SplitSelectedParagraph(double? splitSeconds, int? textIndex, bool a var lines = currentParagraph.Text.SplitToLines(); if (textIndex != null) { - string a = oldText.Substring(0, textIndex.Value).Trim(); - string b = oldText.Substring(textIndex.Value).Trim(); + var ix = Math.Min(oldText.Length, textIndex.Value); + string a = oldText.Substring(0, ix).Trim(); + string b = oldText.Substring(ix).Trim(); if (oldText.TrimStart().StartsWith("", StringComparison.Ordinal) && oldText.TrimEnd().EndsWith("", StringComparison.Ordinal) && Utilities.CountTagInText(oldText, "") == 1 && Utilities.CountTagInText(oldText, "") == 1)