diff --git a/src/libse/Common/PlainTextImporter.cs b/src/libse/Common/PlainTextImporter.cs index 299e0d7f7f4..a413e2c7f69 100644 --- a/src/libse/Common/PlainTextImporter.cs +++ b/src/libse/Common/PlainTextImporter.cs @@ -141,9 +141,9 @@ private bool CurrentWordInDoNotBreakList(string text, int index) private bool NextWordInDoNotBreakList(string text, int index) { - for (var i = index + 1; i < text.Length || i > 50; i++) + for (var i = index + 1; i < text.Length && i - index < 50; i++) { - var ch = text[index]; + var ch = text[i]; if (ch == '\0') { return false;