From: Jerome Benoit Date: Sun, 26 Feb 2017 10:47:04 +0000 (+0100) Subject: exo3.c: Properly initalize a for loop count integer variable. X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=0cd9f5da6c770e971c3156cabdb0d2e627338ab2;p=TD_C.git exo3.c: Properly initalize a for loop count integer variable. Signed-off-by: Jerome Benoit --- diff --git a/exo3/exo3.c b/exo3/exo3.c index 89170ea..03d6390 100644 --- a/exo3/exo3.c +++ b/exo3/exo3.c @@ -32,7 +32,7 @@ void permAlphaChar(char* str, int key) { char alphabet[26] = "abcdefghijklmnopqrstuvwxyz"; int str_length = stringLength(str); - for (int i; i < str_length; i++) { + for (int i = 0; i < str_length; i++) { //if (str[i] == ' ') continue; for (int j = 0; j < 26; j++) { if (str[i] == alphabet[j]) {