From d3a039fa12dc266b3fc66df4bcc0a17e8d2f5794 Mon Sep 17 00:00:00 2001 From: Ian Gulliver Date: Sun, 29 Jun 2014 23:01:48 -0700 Subject: [PATCH] Bugfix for StartOfLine() (actually Context.stringBefore()) --- recentrunes.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/recentrunes.js b/recentrunes.js index f537977..3047aa0 100644 --- a/recentrunes.js +++ b/recentrunes.js @@ -483,6 +483,7 @@ rr.StartOfLine = function() { /** * @type {rr.StartOfLine_} * @const + * @private */ rr.StartOfLine.cache_ = new rr.StartOfLine_(); } @@ -674,7 +675,7 @@ rr.Context.prototype.stringBefore = function(numChars) { numChars += start; start = 0; } - return this.input.slice(start, numChars); + return this.input.slice(start, start + numChars); };