Commit 44ff8632 authored by Joel Martin's avatar Joel Martin

rfb.js: set FBU.bytes before waiting from RRE.

Also, in COPYRECT, set FBU.bytes to the number we know we will need.
parent 1e047758
...@@ -1126,7 +1126,7 @@ encHandlers.COPYRECT = function display_copy_rect() { ...@@ -1126,7 +1126,7 @@ encHandlers.COPYRECT = function display_copy_rect() {
var old_x, old_y; var old_x, old_y;
FBU.bytes = 1; FBU.bytes = 4;
if (ws.rQwait("COPYRECT", 4)) { return false; } if (ws.rQwait("COPYRECT", 4)) { return false; }
display.renderQ_push({ display.renderQ_push({
'type': 'copy', 'type': 'copy',
...@@ -1146,6 +1146,7 @@ encHandlers.RRE = function display_rre() { ...@@ -1146,6 +1146,7 @@ encHandlers.RRE = function display_rre() {
var color, x, y, width, height, chunk; var color, x, y, width, height, chunk;
if (FBU.subrects === 0) { if (FBU.subrects === 0) {
FBU.bytes = 4+fb_Bpp;
if (ws.rQwait("RRE", 4+fb_Bpp)) { return false; } if (ws.rQwait("RRE", 4+fb_Bpp)) { return false; }
FBU.subrects = ws.rQshift32(); FBU.subrects = ws.rQshift32();
color = ws.rQshiftBytes(fb_Bpp); // Background color = ws.rQshiftBytes(fb_Bpp); // Background
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment