summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--aes.c2
1 files changed, 1 insertions, 1 deletions
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)
{