Skip to content

Commit

Permalink
repeat_ctr: oops, I mean mod, not div
Browse files Browse the repository at this point in the history
  • Loading branch information
wwylele authored Dec 14, 2019
1 parent 54efba7 commit 4ee749a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libsave3ds/src/aes_ctr_file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ impl AesCtrFile {
/// Get the XOR pad for the specified block.
fn get_pad(&self, mut block_index: usize) -> [u8; 16] {
if self.repeat_ctr {
block_index /= 0x20;
block_index %= 0x20;
}
let mut cache = self.cache.borrow_mut();
if let Some(cached) = cache.get(&block_index) {
Expand Down

0 comments on commit 4ee749a

Please sign in to comment.