chiark / gitweb /
documentation: calculate the result index differently.
authorVladimír Vondruš <mosra@centrum.cz>
Tue, 12 May 2020 06:56:01 +0000 (08:56 +0200)
committerVladimír Vondruš <mosra@centrum.cz>
Tue, 12 May 2020 07:14:03 +0000 (09:14 +0200)
documentation/search.js

index 82b9fd426e7ef5e3dd18487679e474fcfb6324e3..a4f9a43f435f49cf5b7d6d21313dbaae3a027a93 100644 (file)
@@ -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. */