From cbe7ef263fc5f9a2af26bd8019a6951db60672c1 Mon Sep 17 00:00:00 2001 From: Michael Obermeyer Date: Sun, 1 Nov 2015 16:08:17 -0500 Subject: [PATCH] Fixed an off-by-one error. --- JScript vsdoc Stub Generator 11/StubUtils.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/JScript vsdoc Stub Generator 11/StubUtils.cs b/JScript vsdoc Stub Generator 11/StubUtils.cs index c54498e..8f56cdf 100644 --- a/JScript vsdoc Stub Generator 11/StubUtils.cs +++ b/JScript vsdoc Stub Generator 11/StubUtils.cs @@ -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;