Debugger: Check max document index before figuring out line offsets
This commit is contained in:
+5
@@ -178,6 +178,11 @@ class LineBreakpointExpressionVisitor private constructor(
|
||||
return Lines.EMPTY
|
||||
}
|
||||
|
||||
val maxOffset = document.textLength
|
||||
if (startOffset > maxOffset || endOffset > maxOffset) {
|
||||
return Lines.EMPTY
|
||||
}
|
||||
|
||||
val startLine = document.getLineNumber(startOffset)
|
||||
val endLine = document.getLineNumber(endOffset)
|
||||
return Lines(startLine, endLine)
|
||||
|
||||
Reference in New Issue
Block a user