diff options
-rw-r--r-- | src/pso/PSOV3Encryption.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/pso/PSOV3Encryption.cpp b/src/pso/PSOV3Encryption.cpp index 30c5586..38225bf 100644 --- a/src/pso/PSOV3Encryption.cpp +++ b/src/pso/PSOV3Encryption.cpp @@ -13,17 +13,17 @@ u32 PSOV3Encryption::next() { void PSOV3Encryption::update_stream() { u32 *ptr; - u32 *first_end; - u32 *start; + u32 *part1; + u32 *part2; - start = m_buffer.start(); + part2 = m_buffer.start(); m_buffer_start = m_buffer.start(); + ptr = m_buffer.start(); + part1 = &ptr[489]; - for (ptr = m_buffer.start(), first_end = &ptr[489]; first_end != m_buffer_end;) { - *ptr++ ^= *first_end++; - } + for (; part1 != m_buffer_end; *ptr++ ^= *part1++); + for (; ptr != m_buffer_end; *ptr++ ^= *part2++); - for (u32 *p = ptr; p != m_buffer_end; *p++ ^= *start++); } void PSOV3Encryption::init(u32 seed) { |