From 2c8aff8153fe0aa358be6ebc0a820bc813660ca8 Mon Sep 17 00:00:00 2001 From: C-3PO Date: Sun, 7 Oct 2018 20:05:08 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=97=91=20Remove=20unneeded=20code?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/decrypt.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/decrypt.c b/src/decrypt.c index 17a8924..32e1bc4 100644 --- a/src/decrypt.c +++ b/src/decrypt.c @@ -18,11 +18,9 @@ void initDecryptor(uint32_t key0, uint32_t key1, uint32_t key2) { /** Decrypts the given input in-place. The input buffer will be modified. */ void decrypt(uint8_t* chunk, unsigned long length) { for (unsigned long i = 0; i < length; i += 1) { - //uint8_t curChar = chunk[i]; - uint8_t curChar = *(chunk + i); + uint8_t curChar = chunk[i]; curChar = curChar ^ decryptByte((uint16_t)((uint16_t)(decryptor.key2 & (uint16_t)0xFFFF) | (uint16_t)2)); updateKeys(&(decryptor.key0), &(decryptor.key1), &(decryptor.key2), curChar); - //chunk[i] = curChar; - *(chunk + i) = curChar; + chunk[i] = curChar; } }