1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-23 02:42:41 +01:00

Fix trie instance iterator

This commit is contained in:
Raymond Hill 2021-08-22 13:06:05 -04:00
parent 9ddbb293c0
commit ba83c21354
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -732,11 +732,7 @@ HNTrieContainer.prototype.HNTrieRef = class {
i0 += 1;
}
this.icell = this.container.buf32[this.icell+1];
if ( this.icell === 0 ) {
return this.toHostname();
}
if ( this.container.buf32[this.icell+2] === 0 ) {
this.icell = this.container.buf32[this.icell+1];
if ( (v & 0x80) !== 0 ) {
return this.toHostname();
}
}
@ -748,7 +744,7 @@ HNTrieContainer.prototype.HNTrieRef = class {
return this;
},
container: this.container,
icell: this.iroot,
icell: this.container.buf32[this.iroot],
charBuf: new Uint8Array(256),
charPtr: 256,
forks: [],