From: Joel Martin Date: Wed, 15 Aug 2012 18:47:37 +0000 (-0500) Subject: Revert "Fix tight decoding when using binary/non-base64 connection." X-Git-Tag: v1.0.0~491 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=ca6b3f4cb1216b9155f8fdabe7969e5777a529c5;p=mirror_novnc.git Revert "Fix tight decoding when using binary/non-base64 connection." This reverts commit 14717eb468d9cf1c93559c8d0a6cb16b3c959b55. --- diff --git a/include/rfb.js b/include/rfb.js index 2a321d2..00fb7d8 100644 --- a/include/rfb.js +++ b/include/rfb.js @@ -1252,11 +1252,11 @@ encHandlers.HEXTILE = function display_hextile() { rQi += FBU.bytes - 1; } else { if (FBU.subencoding & 0x02) { // Background - FBU.background = rQ.subarray(rQi, rQi + fb_Bpp); + FBU.background = rQ.slice(rQi, rQi + fb_Bpp); rQi += fb_Bpp; } if (FBU.subencoding & 0x04) { // Foreground - FBU.foreground = rQ.subarray(rQi, rQi + fb_Bpp); + FBU.foreground = rQ.slice(rQi, rQi + fb_Bpp); rQi += fb_Bpp; } @@ -1266,7 +1266,7 @@ encHandlers.HEXTILE = function display_hextile() { rQi += 1; for (s = 0; s < subrects; s += 1) { if (FBU.subencoding & 0x10) { // SubrectsColoured - color = rQ.subarray(rQi, rQi + fb_Bpp); + color = rQ.slice(rQi, rQi + fb_Bpp); rQi += fb_Bpp; } else { color = FBU.foreground; diff --git a/include/util.js b/include/util.js index 030afb4..57ccb54 100644 --- a/include/util.js +++ b/include/util.js @@ -18,10 +18,6 @@ var Util = {}; * Make arrays quack */ -Array.prototype.subarray = function (start, end) { - this.slice(start, end); -}; - Array.prototype.push8 = function (num) { this.push(num & 0xFF); };