Fix `charset` sniffing in reworked response body filtering code

Related feedback:
https://github.com/uBlockOrigin/uBlock-discussions/discussions/830

Related commit:
https://github.com/uBlockOrigin/uBlock-issues/discussions/2537#discussioncomment-5277574
This commit is contained in:
Raymond Hill 2023-11-04 09:50:10 -04:00
parent 4de6bd6f07
commit c38267bb2b
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
1 changed files with 1 additions and 1 deletions

View File

@ -736,7 +736,7 @@ const bodyFilterer = (( ) => {
if ( (i - 40) >= 65536 ) { return; } if ( (i - 40) >= 65536 ) { return; }
i += 8; i += 8;
// find first alpha character // find first alpha character
let j = 0; let j = -1;
while ( j < 8 ) { while ( j < 8 ) {
j += 1; j += 1;
const c = bytes[i+j]; const c = bytes[i+j];