Skip to content
This repository was archived by the owner on Oct 16, 2020. It is now read-only.

Commit e5dfdae

Browse files
committed
Fix ArgumentOutOfRangeException when double-clicking at text offset 0 in the DebuggeeExceptionForm.
1 parent 6fc6bab commit e5dfdae

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/AddIns/Debugger/Debugger.AddIn/Service/DebuggeeExceptionForm.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,11 @@ void ExceptionViewDoubleClick(object sender, EventArgs e)
104104
return;
105105
int start = index;
106106
// find start of current line
107-
while (--start > 0 && fullText[start - 1] != '\n');
107+
while (start > 0 && fullText[start - 1] != '\n')
108+
start--;
108109
// find end of current line
109-
while (++index < fullText.Length && fullText[index] != '\n');
110+
while (index < fullText.Length && fullText[index] != '\n')
111+
index++;
110112

111113
string textLine = fullText.Substring(start, index - start);
112114

0 commit comments

Comments
 (0)