فهرست منبع

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

Also, in COPYRECT, set FBU.bytes to the number we know we will need.
Joel Martin 12 سال پیش
والد
کامیت
44ff863273
1فایلهای تغییر یافته به همراه2 افزوده شده و 1 حذف شده
  1. 2 1
      include/rfb.js

+ 2 - 1
include/rfb.js

@@ -1126,7 +1126,7 @@ encHandlers.COPYRECT = function display_copy_rect() {
 
     var old_x, old_y;
 
-    FBU.bytes = 1;
+    FBU.bytes = 4;
     if (ws.rQwait("COPYRECT", 4)) { return false; }
     display.renderQ_push({
             'type': 'copy',
@@ -1146,6 +1146,7 @@ encHandlers.RRE = function display_rre() {
     var color, x, y, width, height, chunk;
 
     if (FBU.subrects === 0) {
+        FBU.bytes = 4+fb_Bpp;
         if (ws.rQwait("RRE", 4+fb_Bpp)) { return false; }
         FBU.subrects = ws.rQshift32();
         color = ws.rQshiftBytes(fb_Bpp); // Background