From d6189131119f0f34b14829644f3c6504e355c21b Mon Sep 17 00:00:00 2001 From: "A.Olokhtonov" Date: Sun, 24 Nov 2024 00:24:26 +0300 Subject: [PATCH] Fix uninitialized return when no strokes are submitted to a thread --- client/speed.js | 2 +- client/wasm/lod.c | 1 + client/wasm/lod.wasm | Bin 3159 -> 3166 bytes 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/client/speed.js b/client/speed.js index 906c64c..1fdc480 100644 --- a/client/speed.js +++ b/client/speed.js @@ -43,7 +43,7 @@ async function init_wasm(state) { env: { 'memory': memory } }); - const nworkers = 1; //navigator.hardwareConcurrency; + const nworkers = navigator.hardwareConcurrency; state.wasm.exports = master_wasm.instance.exports; state.wasm.heap_base = state.wasm.exports.alloc_static(0); diff --git a/client/wasm/lod.c b/client/wasm/lod.c index a13020c..727b989 100644 --- a/client/wasm/lod.c +++ b/client/wasm/lod.c @@ -207,6 +207,7 @@ do_lod(int *clipped_indices, int clipped_count, float zoom, { if (clipped_count == 0) { result_count[0] = 0; + result_batch_count[0] = 0; return; } diff --git a/client/wasm/lod.wasm b/client/wasm/lod.wasm index 3a4dd811cd96697c46b17feba21f904cf567d14a..17701b12b9f2369032fe198cda57f1f52997169c 100755 GIT binary patch delta 28 kcmcaEaZh5yA4bN*lm9X