From 25990016d565a42d65d26ae5c0087537bbcbd56c Mon Sep 17 00:00:00 2001 From: Javier Smooth Date: Mon, 27 Jul 2015 06:36:18 -0700 Subject: [PATCH] another portable cryptonote-lite fix --- src/crypto/slow-hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/crypto/slow-hash.c b/src/crypto/slow-hash.c index 2febce1..6034458 100644 --- a/src/crypto/slow-hash.c +++ b/src/crypto/slow-hash.c @@ -595,7 +595,7 @@ void cn_slow_hash(const void *data, size_t length, char *hash, int light) { b[i] = state.k[16 + i] ^ state.k[48 + i]; } - for (i = 0; i < ITER / 2; i++) { + for (i = 0; i < ITER / (light?2:1) / 2; i++) { /* Dependency chain: address -> read value ------+ * written value <-+ hard function (AES or MUL) <+ * next address <-+