~ chicken-core (chicken-5) 4c8d3bc6a6ce70da8b86f1b4ecc0ae11530622e7
commit 4c8d3bc6a6ce70da8b86f1b4ecc0ae11530622e7 Author: felix <felix@call-with-current-continuation.org> AuthorDate: Fri Nov 3 14:44:46 2017 +0100 Commit: felix <felix@call-with-current-continuation.org> CommitDate: Fri Nov 3 14:44:46 2017 +0100 bugfix in set-pseudo-random-seed C primitive diff --git a/runtime.c b/runtime.c index c9f5f3f5..63c0e070 100644 --- a/runtime.c +++ b/runtime.c @@ -12635,7 +12635,7 @@ C_word C_set_random_seed(C_word buf, C_word n) int i, nsu = C_unfix(n) / sizeof(C_u32); int off = 0; - for(i = 0; i < C_RANDOM_STATE_SIZE; ++i) { + for(i = 0; i < (C_RANDOM_STATE_SIZE / sizeof(C_u32)); ++i) { if(off >= nsu) off = 0; random_state[ i ] = *((C_u32 *)C_data_pointer(buf) + off);Trap