a-game

2D platformer written from scratch.
Log | Files | Refs | README | LICENSE

commit 97dfebd9bd2cd995f7d53c085b37f7e3103b29f6
parent a5085d030fbcf1294a6589c2f894966377a3d366
Author: Amin Mesbah <dev@aminmesbah.com>
Date:   Tue, 16 Jul 2019 19:35:01 -0700

Don't needlessly build a string

This fixes the "maximum call stack size exceeded" error Chrome was
throwing.

Diffstat:
Msrc/platform_wasm_loader.js | 1-
1 file changed, 0 insertions(+), 1 deletion(-)

diff --git a/src/platform_wasm_loader.js b/src/platform_wasm_loader.js @@ -236,7 +236,6 @@ imports["js_read_entire_file"] = function(name, name_len, out_buf) { return 0; } let arr = memory.subarray(out_buf, out_buf + file.byteLength); - let s = String.fromCharCode.apply(null, arr); arr.set(new Uint8Array(file)); } imports["js_print"] = function(s, len) {