Browse Source

Fix ArgumentOutOfRangeException when double-clicking at text offset 0 in the DebuggeeExceptionForm.

pull/507/head
Daniel Grunwald 11 years ago
parent
commit
e5dfdae116
  1. 6
      src/AddIns/Debugger/Debugger.AddIn/Service/DebuggeeExceptionForm.cs

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

@ -104,9 +104,11 @@ namespace ICSharpCode.SharpDevelop.Services @@ -104,9 +104,11 @@ namespace ICSharpCode.SharpDevelop.Services
return;
int start = index;
// find start of current line
while (--start > 0 && fullText[start - 1] != '\n');
while (start > 0 && fullText[start - 1] != '\n')
start--;
// find end of current line
while (++index < fullText.Length && fullText[index] != '\n');
while (index < fullText.Length && fullText[index] != '\n')
index++;
string textLine = fullText.Substring(start, index - start);

Loading…
Cancel
Save