]> git.proxmox.com Git - mirror_novnc.git/commitdiff
Call rQshiftBytes to avoid code duplication
authorSamuel Mannehed <samuel@cendio.se>
Thu, 14 Jun 2018 14:51:29 +0000 (16:51 +0200)
committerSamuel Mannehed <samuel@cendio.se>
Thu, 14 Jun 2018 14:51:29 +0000 (16:51 +0200)
core/websock.js

index 4dc9143854a77837a005519047a76df8a21710d9..9291d4ed7d0afafa2a6ccab10f1e8c9e4b1b3879 100644 (file)
@@ -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);
     },