mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-11 09:31:01 +01:00
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
3 changed files with 3 additions and 3 deletions
|
@ -658,7 +658,7 @@ const roundToPageSize = v => (v + PAGE_SIZE-1) & ~(PAGE_SIZE-1);
|
|||
i += 1;
|
||||
}
|
||||
haystackLeft += 1;
|
||||
if ( haystackLeft === haystackEnd ) { break; }
|
||||
if ( haystackLeft > haystackEnd ) { break; }
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
|
Binary file not shown.
|
@ -606,9 +606,9 @@
|
|||
i32.const 1
|
||||
i32.add
|
||||
tee_local $haystackLeft
|
||||
;; if ( haystackLeft === haystackEnd ) { break; }
|
||||
;; if ( haystackLeft > haystackEnd ) { break; }
|
||||
get_local $haystackEnd
|
||||
i32.eq
|
||||
i32.gt_u
|
||||
br_if $fail
|
||||
br $mainLoop
|
||||
;; }
|
||||
|
|
Loading…
Reference in a new issue