fixed out of bounds error

This commit is contained in:
Kyler 2024-06-02 21:55:51 -06:00
parent 80bb7dcea8
commit 23fcf954af
1 changed files with 1 additions and 1 deletions

View File

@ -61,7 +61,7 @@ impl McCipher {
}
fn shift_left(mut arr: [u8; 16], new: u8) {
for i in 0..arr.len() + 1 {
for i in 0..arr.len() - 1 {
arr[i] = arr[i + 1];
}
arr[15] = new;