Fix encrypting the sector0x96

This commit is contained in:
d0k3 2016-05-21 17:02:35 +02:00
parent 172a7c637d
commit fa49efbdbd
3 changed files with 3 additions and 3 deletions

View File

@ -379,7 +379,7 @@ bool PathCopyVirtual(const char* destdir, const char* orig) {
return false;
// check if destination exists
if (f_stat(dest, NULL) == FR_OK) {
if (!ShowPrompt(true, "Destination already exists:\n%s\nOverwrite existing file(s)?", deststr))
if (!ShowPrompt(true, "Destination already exists:\n%s\nOverwrite existing file?", deststr))
return false;
}
if (f_open(&dfile, dest, FA_WRITE | FA_CREATE_ALWAYS) != FR_OK)

View File

@ -7,7 +7,7 @@
#include "virtual.h"
#include "image.h"
#define VERSION "0.4.5"
#define VERSION "0.4.6"
#define N_PANES 2
#define IMG_DRV "789I"

View File

@ -295,7 +295,7 @@ int WriteNandSectors(const u8* buffer, u32 sector, u32 count, u32 keyslot, u32 n
for (u32 s = 0; s < count; s += (NAND_BUFFER_SIZE / 0x200)) {
u32 pcount = min((NAND_BUFFER_SIZE/0x200), (count - s));
memcpy(NAND_BUFFER, buffer + (s*0x200), pcount * 0x200);
if ((keyslot == 0x11) && (sector == 0x96)) CryptSector0x96((u8*) buffer, true);
if ((keyslot == 0x11) && (sector == 0x96)) CryptSector0x96(NAND_BUFFER, true);
else if (keyslot < 0x40) CryptNand(NAND_BUFFER, sector + s, pcount, keyslot);
if (nand_dst == NAND_EMUNAND) {
int errorcode = 0;