From 6024677ffaf9dcd3ada1d5771bd7c41ad3003df0 Mon Sep 17 00:00:00 2001 From: "Alexander E. Patrakov" Date: Sun, 31 Jul 2016 21:55:04 +0500 Subject: [PATCH] Fixed RGB data buffer size (#615) --- include/display.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/display.js b/include/display.js index a492817d..665fd3d2 100644 --- a/include/display.js +++ b/include/display.js @@ -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',