From: chaoskagami Date: Sun, 19 Jun 2016 10:46:59 +0000 (-0400) Subject: Code is wrong. Correct it. X-Git-Tag: v0.1.1~12 X-Git-Url: https://chaos.moe/g/?a=commitdiff_plain;h=a2d8db8a847c3a9795478f90c40374fa8cfe9fcd;p=corbenik%2Fcorbenik.git Code is wrong. Correct it. --- diff --git a/source/patch/emunand.c b/source/patch/emunand.c index 65601f1..ac2de8c 100644 --- a/source/patch/emunand.c +++ b/source/patch/emunand.c @@ -40,13 +40,15 @@ verify_emunand(uint32_t index, uint32_t *off, uint32_t *head) uint32_t offset; if (nandSize > 0x200000) - offset = 0x400000 * index; + offset = 0x400000; else - offset = 0x200000 * index; + offset = 0x200000; if (config.options[OPTION_EMUNAND_REVERSE]) { // Subtract offset from back of disk. - offset = ( getMMCDevice(1)->total_size - 1) - offset; + offset = (getMMCDevice(1)->total_size - 1) - (offset * (index + 1)); + } else { + offset = offset * index; } // Check for RedNAND/Normal physical layout on SD