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
This commit is contained in:
niksedk 2012-03-11 19:37:58 +00:00
parent 56b3b7f3ff
commit 2a444e74c1

View File

@ -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;