Web bindings: fix descendantsOfType memory allocation

This commit is contained in:
Jon Bockhorst 2021-03-13 22:28:10 -06:00
parent ec8520ca42
commit 1e9481dc48

View file

@ -362,7 +362,7 @@ class Node {
}
// Copy the array of symbols to the WASM heap.
const symbolsAddress = C._malloc(SIZE_OF_INT * symbols.count);
const symbolsAddress = C._malloc(SIZE_OF_INT * symbols.length);
for (let i = 0, n = symbols.length; i < n; i++) {
setValue(symbolsAddress + i * SIZE_OF_INT, symbols[i], 'i32');
}