From a2d8db8a847c3a9795478f90c40374fa8cfe9fcd Mon Sep 17 00:00:00 2001 From: chaoskagami Date: Sun, 19 Jun 2016 06:46:59 -0400 Subject: [PATCH] Code is wrong. Correct it. --- source/patch/emunand.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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 -- 2.39.5