From f117c280d057959efcd35509fb1b6669338d23b2 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Mon, 14 Oct 2019 09:03:51 -0400 Subject: [PATCH] Fix minor bugs spotted during code review --- src/js/static-net-filtering.js | 1 + src/js/utils.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/js/static-net-filtering.js b/src/js/static-net-filtering.js index 34eace3eb..855635b17 100644 --- a/src/js/static-net-filtering.js +++ b/src/js/static-net-filtering.js @@ -194,6 +194,7 @@ const isHnAnchored = (( ) => { } else { lastEnd = -1; } + lastLen = len; } return matchStart < lastEnd && ( matchStart === lastBeg || diff --git a/src/js/utils.js b/src/js/utils.js index ed493033a..ca312bd07 100644 --- a/src/js/utils.js +++ b/src/js/utils.js @@ -585,7 +585,7 @@ } const inputLength = instr.length; const outbuf = arrbuf instanceof ArrayBuffer === false - ? new Uint32Array(this.decodeSize(instr)) + ? new Uint32Array(this.decodeSize(instr) >> 2) : new Uint32Array(arrbuf); let i = instr.indexOf(' ', this.magic.length) + 1; if ( i === -1 ) {