mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Fix seeder, update with dynamic interface for random. Insert unreachable after panic in asserts. Macro ensure static check.
This commit is contained in:
committed by
Christoffer Lerno
parent
0b67f1a8e4
commit
0120498ec8
@@ -16,7 +16,7 @@ fn char[] seeder(usz outChars, char[] input)
|
||||
words[..] = ODD_PHI64;
|
||||
|
||||
// Add word at a time
|
||||
for (usz i = 0; i <= input.len / 8; i++)
|
||||
for (usz i = 0; i < input.len / 8; i++)
|
||||
{
|
||||
usz j = i % words.len;
|
||||
words[j] -= bitcast(*(char[8]*)&input[i * 8], ulong) * MUL_LCG64;
|
||||
|
||||
Reference in New Issue
Block a user