summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorsiikamiika <siikamiika@users.noreply.github.com>2019-08-19 19:47:45 +0300
committersiikamiika <siikamiika@users.noreply.github.com>2019-08-19 19:47:45 +0300
commit39b2456ce9048d1d2b8a4f5ac5eb39554085cff5 (patch)
treebeaf24906e5ef8c07eb60f626c5547003ff9f3f2 /ext
parent1d6eb1c3d9ca26f21f3d19c92111d36bd4b3eea0 (diff)
fix off by one error
Diffstat (limited to 'ext')
-rw-r--r--ext/fg/js/source.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/fg/js/source.js b/ext/fg/js/source.js
index bbf00e30..a360b331 100644
--- a/ext/fg/js/source.js
+++ b/ext/fg/js/source.js
@@ -180,7 +180,7 @@ class TextSourceRange {
let consumed = 0;
let stripped = 0;
while (state.remainder - consumed > 0) {
- const currentChar = node.nodeValue[offset - consumed - stripped]; // negative indices are undefined in JS
+ const currentChar = node.nodeValue[offset - 1 - consumed - stripped]; // negative indices are undefined in JS
if (!currentChar) {
break;
} else if (currentChar.match(IGNORE_TEXT_PATTERN)) {