Fix javascript bindings to correctly pass the random buffer

This commit is contained in:
Mark Haines 2015-06-26 16:16:34 +01:00
parent 84d6fbb0dc
commit f2168004a1

View file

@ -16,6 +16,7 @@ function random_stack(size) {
var ptr = stack(size);
var array = new Uint8Array(Module['HEAPU8'].buffer, ptr, size);
window.crypto.getRandomValues(array);
return ptr;
}
function restore_stack(wrapped) {