From: Vladimír Vondruš Date: Tue, 12 May 2020 06:56:01 +0000 (+0200) Subject: documentation: calculate the result index differently. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?a=commitdiff_plain;h=e2ae37c24dc82e6734fbbf8ae4d154964d7fec54;p=blog.git documentation: calculate the result index differently. --- diff --git a/documentation/search.js b/documentation/search.js index 82b9fd42..a4f9a43f 100644 --- a/documentation/search.js +++ b/documentation/search.js @@ -330,7 +330,7 @@ var Search = { /* Populate the results with all values associated with this node */ for(let i = 0; i != resultCount; ++i) { - let index = this.trie.getUint16(offset + (i + 1)*2, true); + let index = this.trie.getUint16(offset + 2 + i*2, true); results.push(this.gatherResult(index, suffixLength, 0xffffff)); /* should be enough haha */ /* 'nuff said. */