From 2a444e74c153f32bd69db80c243c9b65a1039752 Mon Sep 17 00:00:00 2001 From: niksedk Date: Sun, 11 Mar 2012 19:37:58 +0000 Subject: [PATCH] Fix Crash in fix common errors (remove unneeded spaces) - thx George :) git-svn-id: https://subtitleedit.googlecode.com/svn/trunk@1034 99eadd0c-20b8-1223-b5c4-2a2b2df33de2 --- src/Forms/FixCommonErrors.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Forms/FixCommonErrors.cs b/src/Forms/FixCommonErrors.cs index 99b39ab42..72e3c249a 100644 --- a/src/Forms/FixCommonErrors.cs +++ b/src/Forms/FixCommonErrors.cs @@ -954,7 +954,7 @@ namespace Nikse.SubtitleEdit.Forms else if (before.Length > 0) p.Text = p.Text.Remove(idx + 1, 1); } - if (idx + 1 < p.Text.Length) + if (idx + 1 < p.Text.Length && idx != -1) idx = p.Text.IndexOf("- ", idx + 1); else idx = -1;