]> git.proxmox.com Git - mirror_novnc.git/commitdiff
Fixed RGB data buffer size (#615)
authorAlexander E. Patrakov <patrakov@gmail.com>
Sun, 31 Jul 2016 16:55:04 +0000 (21:55 +0500)
committerAlexander E. Patrakov <patrakov@gmail.com>
Sun, 31 Jul 2016 16:55:04 +0000 (21:55 +0500)
include/display.js

index a492817dd3baf75a661e4f699cdeccdc1d6d8a22..665fd3d23b3deb779804ef96704f2e31d1ef3594 100644 (file)
@@ -496,7 +496,7 @@ var Display;
                 // NB(directxman12): it's technically more performant here to use preallocated arrays,
                 // but it's a lot of extra work for not a lot of payoff -- if we're using the render queue,
                 // this probably isn't getting called *nearly* as much
-                var new_arr = new Uint8Array(width * height * 4);
+                var new_arr = new Uint8Array(width * height * 3);
                 new_arr.set(new Uint8Array(arr.buffer, 0, new_arr.length));
                 this.renderQ_push({
                     'type': 'blitRgb',