From 74f02e453779a5f050af320aa126f6a62a1656d1 Mon Sep 17 00:00:00 2001 From: Logen Kain Date: Sat, 21 Jan 2017 22:23:36 -0700 Subject: [PATCH] Blackjack: Replaced magic number with len(x) --- blackjack/blackjack.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/blackjack/blackjack.c b/blackjack/blackjack.c index f8bdd2b..29a97aa 100644 --- a/blackjack/blackjack.c +++ b/blackjack/blackjack.c @@ -46,8 +46,7 @@ void shuffel (int *array, int n){ int i, j, tmp; - - for (i=n; i>-1 ;i--){ + for (i=n; i >= len(array) ;i--){ if (i != 0){ j = rand() % i;