Fix broken filter parsing when prepended with spaces

Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2540
This commit is contained in:
Raymond Hill 2023-03-12 09:45:33 -04:00
parent f4391adc5c
commit b63ced24d4
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
1 changed files with 1 additions and 1 deletions

View File

@ -1096,7 +1096,7 @@ export class AstFilterParser {
let anchorBeg = this.indexOfNetAnchor(parentStr, patternBeg);
if ( anchorBeg === -1 ) { return 0; }
anchorBeg += parentBeg;
if ( anchorBeg !== parentStr.length ) {
if ( anchorBeg !== parentEnd ) {
tail = this.allocTypedNode(
NODE_TYPE_NET_OPTIONS_ANCHOR,
anchorBeg,