From bb916aa999c400813b7be5b73abc6cd751e9f531 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sat, 2 Dec 2017 19:07:10 +0100 Subject: [PATCH] fix: removed a warning --- client/cmdhfmf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/client/cmdhfmf.c b/client/cmdhfmf.c index 8dd59f16a..f1ccabce4 100644 --- a/client/cmdhfmf.c +++ b/client/cmdhfmf.c @@ -1167,7 +1167,7 @@ int CmdHF14AMfNestedHard(const char *Cmd) { } int randInRange(int min, int max) { - return min + (int) (rand() / (double) (RAND_MAX + 1) * (max - min + 1)); + return min + (int) (rand() / (double) (RAND_MAX) * (max - min + 1)); } //Fisher–Yates shuffle @@ -1177,7 +1177,6 @@ void shuffle( uint8_t *array, uint16_t len) { time_t t; srand((unsigned) time(&t)); while (len) { - //x = randInRange(0, len) * (len-- *6) | 0; // 0 = i < n x = randInRange(0, (len -= 6) ) | 0; // 0 = i < n x %= 6; memcpy(tmp, array + x, 6);