From b63bbe50921af06cf56f06ebcc124986b098e8ca Mon Sep 17 00:00:00 2001 From: Logan oos Even Date: Sat, 12 Jun 2021 21:03:36 +0545 Subject: [PATCH] corrections --- prospector.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/prospector.c b/prospector.c index 6ab95d9..4691f53 100644 --- a/prospector.c +++ b/prospector.c @@ -191,7 +191,7 @@ hf_randomize(struct hf_op *op, uint64_t s[2]) op->constant1 = 1 + (r >> 10) % 31; if (op->constant1 == op->constant0) { // do not allow both constants to be equal - op->constant 1 + ((r >> 10) + 1) % 31; + op->constant1 = 1 + ((r >> 10) + 1) % 31; } break; case HF64_XOR: @@ -214,6 +214,10 @@ hf_randomize(struct hf_op *op, uint64_t s[2]) case HF64_XROT2: op->constant0 = 1 + r % 63; op->constant1 = 1 + (r >> 12) % 63; + if (op->constant1 == op->constant0) { + // do not allow both constants to be equal + op->constant1 = 1 + ((r >> 12) + 1) % 63; + } break; } }