1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-05 10:22:30 +01:00

Fix string slice extraction from parser

Reported internally.

Regression from:
- 01b1ed9a98

The regression was made apparent be the fact that
AdGuard filter lists have lines ending with the
CR character.
This commit is contained in:
Raymond Hill 2020-06-07 07:40:00 -04:00
parent 5408e10a95
commit f869348d1f
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -758,7 +758,7 @@ const Parser = class {
strFromSpan(span) {
if ( span.l === 0 ) { return ''; }
const beg = span.i;
return this.strFromSlices(beg, beg + span.l - 1);
return this.strFromSlices(beg, beg + span.l - 3);
}
isBlank() {