fix for wasm

dev
MITSUNARI Shigeo 6 years ago
parent 494ebb1439
commit 0a086ef1c9
  1. 5
      src/bn_c_impl.hpp

@ -136,8 +136,9 @@ int mclBnFr_isOne(const mclBnFr *x)
#ifndef MCL_DONT_USE_CSRPNG #ifndef MCL_DONT_USE_CSRPNG
int mclBnFr_setByCSPRNG(mclBnFr *x) int mclBnFr_setByCSPRNG(mclBnFr *x)
{ {
cast(x)->setByCSPRNG(); bool b;
return 0; cast(x)->setByCSPRNG(&b);
return b ? 0 : -1;
} }
void mclBn_setRandFunc(void *self, unsigned int (*readFunc)(void *self, void *buf, unsigned int bufSize)) void mclBn_setRandFunc(void *self, unsigned int (*readFunc)(void *self, void *buf, unsigned int bufSize))
{ {

Loading…
Cancel
Save