EA-704298 IOOBE: CharSequenceSubSequence.<init>

GitOrigin-RevId: 474a2ec4c7414e78a460165ba53e652162af868f
This commit is contained in:
Dmitry Avdeev
2024-04-13 23:19:56 +02:00
committed by intellij-monorepo-bot
parent b37616b3f5
commit 3ce30531ae

View File

@@ -66,7 +66,11 @@ public class XmlSmartEnterProcessor extends SmartEnterProcessor {
}
if (tagNameText == null) {
tagNameText = text.subSequence(tagAtCaret.getTextRange().getStartOffset() + 1, caretAt);
int start = tagAtCaret.getTextRange().getStartOffset() + 1;
if (start > caretAt) {
return false;
}
tagNameText = text.subSequence(start, caretAt);
}
final PsiElement element = psiFile.findElementAt(probableCommaOffset);