mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-10 09:07:54 +01:00
code review for 5c15f685
This commit is contained in:
parent
c5f870a367
commit
cb060e54ee
1 changed files with 3 additions and 5 deletions
|
@ -178,15 +178,13 @@ vAPI.net.registerListeners = function() {
|
||||||
bufOut[iOut++] = (b1 << 4) & 0xF0 | (b2 >>> 2);
|
bufOut[iOut++] = (b1 << 4) & 0xF0 | (b2 >>> 2);
|
||||||
bufOut[iOut++] = (b2 << 6) & 0xC0 | b3;
|
bufOut[iOut++] = (b2 << 6) & 0xC0 | b3;
|
||||||
}
|
}
|
||||||
if ( n < sizeIn ) {
|
if ( iIn !== sizeIn ) {
|
||||||
let b0 = dec[bufIn.charCodeAt(iIn++)];
|
let b0 = dec[bufIn.charCodeAt(iIn++)];
|
||||||
let b1 = dec[bufIn.charCodeAt(iIn++)];
|
let b1 = dec[bufIn.charCodeAt(iIn++)];
|
||||||
if ( (sizeIn & 3) === 2 ) {
|
bufOut[iOut++] = (b0 << 2) & 0xFC | (b1 >>> 4);
|
||||||
|
if ( iIn !== sizeIn ) {
|
||||||
let b2 = dec[bufIn.charCodeAt(iIn++)];
|
let b2 = dec[bufIn.charCodeAt(iIn++)];
|
||||||
bufOut[iOut++] = (b0 << 2) & 0xFC | (b1 >>> 4);
|
|
||||||
bufOut[iOut++] = (b1 << 4) & 0xF0 | (b2 >>> 2);
|
bufOut[iOut++] = (b1 << 4) & 0xF0 | (b2 >>> 2);
|
||||||
} else {
|
|
||||||
bufOut[iOut++] = (b0 << 2) & 0xFC | (b1 >>> 4);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.write(bufOut);
|
this.write(bufOut);
|
||||||
|
|
Loading…
Reference in a new issue