From e237f74048182219788947b6c4a16862d00a7142 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Sat, 2 Oct 2010 12:18:27 +0200 Subject: [PATCH] fixed http://community.sharpdevelop.net/forums/p/11951/32716.aspx#32716 --- .../Project/Src/VBNet/VBNetExpressionFinder.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/VBNet/VBNetExpressionFinder.cs b/src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/VBNet/VBNetExpressionFinder.cs index 7dca52082a..35602701ed 100644 --- a/src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/VBNet/VBNetExpressionFinder.cs +++ b/src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/VBNet/VBNetExpressionFinder.cs @@ -26,7 +26,8 @@ namespace ICSharpCode.SharpDevelop.Dom.VBNet 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; }