We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 69a9026 commit b8ded44Copy full SHA for b8ded44
src/_igraph/random.c
@@ -44,7 +44,12 @@ typedef struct {
44
} igraph_i_rng_Python_state_t;
45
46
#define RNG_BITS 32
47
-#define RNG_MAX ((((size_t) 1) << RNG_BITS) - 1)
+#ifdef __wasm32__
48
+ /* size_t is 32-bit on wasm32 so we cannot use the shift trick */
49
+ #define RNG_MAX 0xFFFFFFFF
50
+#else
51
+ #define RNG_MAX ((((size_t) 1) << RNG_BITS) - 1)
52
+#endif
53
54
static igraph_i_rng_Python_state_t igraph_rng_Python_state = {0};
55
static igraph_rng_t igraph_rng_Python = {
0 commit comments