diff --git a/src/crypto/pc.rs b/src/crypto/pc.rs index 2efb3b3..19701ab 100644 --- a/src/crypto/pc.rs +++ b/src/crypto/pc.rs @@ -82,7 +82,7 @@ impl PSOPCCipher { } fn next(&mut self) -> u32 { - if self.offset as usize == PC_STREAM_LENGTH { + if self.offset as usize == PC_STREAM_LENGTH - 1 { self.update_stream(); self.offset = 1; }