From 362bd5e3a2cb95ac69456342e5006b3393f928e1 Mon Sep 17 00:00:00 2001 From: Samuel Mannehed Date: Thu, 14 Jun 2018 16:51:29 +0200 Subject: [PATCH] Call rQshiftBytes to avoid code duplication --- core/websock.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/websock.js b/core/websock.js index 4dc9143..9291d4e 100644 --- a/core/websock.js +++ b/core/websock.js @@ -100,8 +100,7 @@ Websock.prototype = { rQshiftStr: function (len) { if (typeof(len) === 'undefined') { len = this.rQlen(); } - const arr = new Uint8Array(this._rQ.buffer, this._rQi, len); - this._rQi += len; + const arr = this.rQshiftBytes(len); return String.fromCharCode.apply(null, arr); }, -- 2.39.2