Siegfried Pammer 15 years ago
parent
commit
e237f74048
  1. 3
      src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/VBNet/VBNetExpressionFinder.cs

3
src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/VBNet/VBNetExpressionFinder.cs

@ -26,7 +26,8 @@ namespace ICSharpCode.SharpDevelop.Dom.VBNet
int LocationToOffset(Location location) int LocationToOffset(Location location)
{ {
if (location.Line <= 0) return -1; if (location.Line <= 0 || location.Line >= lineOffsets.Count)
return -1;
return lineOffsets[location.Line - 1] + location.Column - 1; return lineOffsets[location.Line - 1] + location.Column - 1;
} }

Loading…
Cancel
Save