Skip to content

Commit

Permalink
maybe fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
esromneb committed Sep 28, 2020
1 parent 7898fb0 commit 0d73ffd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/wrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ function u8ToBn(u8) {
hex.push(h);
});

hex.reverse();

return BigInt('0x' + hex.join(''));
}

Expand Down Expand Up @@ -132,8 +134,8 @@ module.exports = () => {
// console.log(`event ${name} time ${time} cmd ${command} wrds ${valueWords}`);


const view0 = wasm.HEAPU8.subarray(value, value+(valueWords*8));
const view1 = wasm.HEAPU8.subarray(mask, mask+(valueWords*8));
const view0 = wasm.HEAPU8.subarray(value, value+(valueWords*4));
const view1 = wasm.HEAPU8.subarray(mask, mask+(valueWords*4));

let big_value = u8ToBn(view0);
let big_mask = u8ToBn(view1);
Expand Down

0 comments on commit 0d73ffd

Please sign in to comment.