From acb9aaa83d023c0faaa2eaeedf8cb735e6f28f1e Mon Sep 17 00:00:00 2001 From: "A.Olokhtonov" Date: Mon, 27 May 2024 10:38:53 +0300 Subject: [PATCH] Fix misallocation of pressures tv_array --- client/speed.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/speed.js b/client/speed.js index 70c5098..bd97e8c 100644 --- a/client/speed.js +++ b/client/speed.js @@ -138,7 +138,7 @@ function wasm_ensure_by(state, nstrokes, ncoords) { buffers['xs'].tv = tv_create_on(Float32Array, coords_bytes / 4, mem, buffers['xs'].offset); buffers['ys'].tv = tv_create_on(Float32Array, coords_bytes / 4, mem, buffers['ys'].offset); - buffers['pressures'].tv = tv_create_on(Uint8Array, coords_bytes / 8, mem, buffers['pressures'].offset); + buffers['pressures'].tv = tv_create_on(Uint8Array, coords_bytes, mem, buffers['pressures'].offset); buffers['coords_from'].tv = tv_create_on(Uint32Array, stroke_bytes / 4, mem, buffers['coords_from'].offset); // TODO: this should have been automatic maybe?