diff options
author | MITSUNARI Shigeo <herumi@nifty.com> | 2018-10-28 14:18:10 +0800 |
---|---|---|
committer | MITSUNARI Shigeo <herumi@nifty.com> | 2018-10-28 14:18:10 +0800 |
commit | 0a086ef1c9b66afd6d727de5fb6a152bacde18d7 (patch) | |
tree | 0940f02d3d8a6537994faa353b47ef5b4da277e9 | |
parent | 494ebb1439b5942824f5cbe3a5ccf87406b45815 (diff) | |
download | tangerine-mcl-0a086ef1c9b66afd6d727de5fb6a152bacde18d7.tar.gz tangerine-mcl-0a086ef1c9b66afd6d727de5fb6a152bacde18d7.tar.zst tangerine-mcl-0a086ef1c9b66afd6d727de5fb6a152bacde18d7.zip |
fix for wasm
-rw-r--r-- | src/bn_c_impl.hpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/bn_c_impl.hpp b/src/bn_c_impl.hpp index 497ae2b..a31b4f8 100644 --- a/src/bn_c_impl.hpp +++ b/src/bn_c_impl.hpp @@ -136,8 +136,9 @@ int mclBnFr_isOne(const mclBnFr *x) #ifndef MCL_DONT_USE_CSRPNG int mclBnFr_setByCSPRNG(mclBnFr *x) { - cast(x)->setByCSPRNG(); - return 0; + bool b; + cast(x)->setByCSPRNG(&b); + return b ? 0 : -1; } void mclBn_setRandFunc(void *self, unsigned int (*readFunc)(void *self, void *buf, unsigned int bufSize)) { |