diff --git a/aes.c b/aes.c index 7dd06e4..6a9b641 100644 --- a/aes.c +++ b/aes.c @@ -137,7 +137,7 @@ static void KeyExpansion() } // All other round keys are found from the previous round keys. - for(; (i < (Nb * Nr) + 1); ++i) + for(; (i < (Nb * (Nr + 1)); ++i) { for(j = 0; j < 4; ++j) {