mirror of https://github.com/gorhill/uBlock.git
Fix edge case involving filter with a single wildcard
This fix the case of the following filter: trk*.vidible.tv Not matching: https://trk.vidible.tv/trk/.vidible.tv The wildcard is supposed to match any number of characters, including zero characters. The issue is that the code was not matching zero characters. This is due to an incorrect comparison in BidiTrieContainer.indexOf(), causing the code to bail out before testing for the zero character condition.
This commit is contained in:
parent
ca0c48717b
commit
a08cdd721a
|
@ -658,7 +658,7 @@ const roundToPageSize = v => (v + PAGE_SIZE-1) & ~(PAGE_SIZE-1);
|
||||||
i += 1;
|
i += 1;
|
||||||
}
|
}
|
||||||
haystackLeft += 1;
|
haystackLeft += 1;
|
||||||
if ( haystackLeft === haystackEnd ) { break; }
|
if ( haystackLeft > haystackEnd ) { break; }
|
||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
|
@ -606,9 +606,9 @@
|
||||||
i32.const 1
|
i32.const 1
|
||||||
i32.add
|
i32.add
|
||||||
tee_local $haystackLeft
|
tee_local $haystackLeft
|
||||||
;; if ( haystackLeft === haystackEnd ) { break; }
|
;; if ( haystackLeft > haystackEnd ) { break; }
|
||||||
get_local $haystackEnd
|
get_local $haystackEnd
|
||||||
i32.eq
|
i32.gt_u
|
||||||
br_if $fail
|
br_if $fail
|
||||||
br $mainLoop
|
br $mainLoop
|
||||||
;; }
|
;; }
|
||||||
|
|
Loading…
Reference in New Issue