Fix tight decoding when using binary/non-base64 connection.
This commit is contained in:
parent
4dd1bb1ecb
commit
14717eb468
|
@ -1252,11 +1252,11 @@ encHandlers.HEXTILE = function display_hextile() {
|
||||||
rQi += FBU.bytes - 1;
|
rQi += FBU.bytes - 1;
|
||||||
} else {
|
} else {
|
||||||
if (FBU.subencoding & 0x02) { // Background
|
if (FBU.subencoding & 0x02) { // Background
|
||||||
FBU.background = rQ.slice(rQi, rQi + fb_Bpp);
|
FBU.background = rQ.subarray(rQi, rQi + fb_Bpp);
|
||||||
rQi += fb_Bpp;
|
rQi += fb_Bpp;
|
||||||
}
|
}
|
||||||
if (FBU.subencoding & 0x04) { // Foreground
|
if (FBU.subencoding & 0x04) { // Foreground
|
||||||
FBU.foreground = rQ.slice(rQi, rQi + fb_Bpp);
|
FBU.foreground = rQ.subarray(rQi, rQi + fb_Bpp);
|
||||||
rQi += fb_Bpp;
|
rQi += fb_Bpp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1266,7 +1266,7 @@ encHandlers.HEXTILE = function display_hextile() {
|
||||||
rQi += 1;
|
rQi += 1;
|
||||||
for (s = 0; s < subrects; s += 1) {
|
for (s = 0; s < subrects; s += 1) {
|
||||||
if (FBU.subencoding & 0x10) { // SubrectsColoured
|
if (FBU.subencoding & 0x10) { // SubrectsColoured
|
||||||
color = rQ.slice(rQi, rQi + fb_Bpp);
|
color = rQ.subarray(rQi, rQi + fb_Bpp);
|
||||||
rQi += fb_Bpp;
|
rQi += fb_Bpp;
|
||||||
} else {
|
} else {
|
||||||
color = FBU.foreground;
|
color = FBU.foreground;
|
||||||
|
|
|
@ -18,6 +18,10 @@ var Util = {};
|
||||||
* Make arrays quack
|
* Make arrays quack
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
Array.prototype.subarray = function (start, end) {
|
||||||
|
this.slice(start, end);
|
||||||
|
};
|
||||||
|
|
||||||
Array.prototype.push8 = function (num) {
|
Array.prototype.push8 = function (num) {
|
||||||
this.push(num & 0xFF);
|
this.push(num & 0xFF);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue