From eb7f23b173fa5a8c5798eac3f79771716c07af0d Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Tue, 8 Apr 2025 15:42:00 -0400 Subject: [PATCH] Fix silly test Related feedback: https://github.com/uBlockOrigin/uBlock-issues/discussions/1755#discussioncomment-12769044 Related commit: https://github.com/gorhill/uBlock/commit/8b696a691a0871da8200d1806300842d988a4326 --- src/js/static-ext-filtering-db.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/static-ext-filtering-db.js b/src/js/static-ext-filtering-db.js index 775c93229..bf7ebe711 100644 --- a/src/js/static-ext-filtering-db.js +++ b/src/js/static-ext-filtering-db.js @@ -198,7 +198,7 @@ export class StaticExtFilteringHostnameDB { } if ( hn.endsWith(matcher.hn) === false ) { return false; } if ( hn.length !== matcher.hn.length ) { - if ( hn.at(-1) !== '.' ) { return false; } + if ( hn.at(hn.length - matcher.hn.length - 1) !== '.' ) { return false; } } return pn.startsWith(matcher.pn); }