Skip to content

Commit

Permalink
Fixed an off-by-one error.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Obermeyer committed Nov 1, 2015
1 parent 844378e commit cbe7ef2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions JScript vsdoc Stub Generator 11/StubUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,7 @@ private static int GetTypeScriptFunctionLine(ITextSnapshot capture, int lineNumb
var parenBlock = GetCompleteParenBlock(capture, lineNumber, line.Start + lineText.IndexOf("("));
if (parenBlock == null) { return -1; }

// add one because GetCompleteParenBlock excludes closing parenthesis.
var endParamsPosition = line.Start.Position + parenOpen + parenBlock.Length + 1;
var endParamsPosition = line.Start.Position + parenOpen + parenBlock.Length;

var lineEnd = capture.GetLineFromPosition(endParamsPosition);
var startTextAfterParams = endParamsPosition + 1;
Expand Down

0 comments on commit cbe7ef2

Please sign in to comment.