From 72c5f21339d8bd0c1a253ae20f869aaa7b0424c4 Mon Sep 17 00:00:00 2001 From: d0k3 Date: Tue, 29 Nov 2016 02:31:15 +0100 Subject: [PATCH] Fixed NCCH mount handling for ExeFS --- source/virtual/vgame.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/source/virtual/vgame.c b/source/virtual/vgame.c index 8121844..ab99146 100644 --- a/source/virtual/vgame.c +++ b/source/virtual/vgame.c @@ -77,7 +77,7 @@ bool BuildVGameExeFsDir(void) { for (u32 i = 0; i < 10; i++) { ExeFsFileHeader* file = exefs->files + i; if (file->size == 0) continue; - strncpy(templates[n].name, file->name, 32); + snprintf(templates[n].name, 32, "%.8s", file->name); templates[n].offset = offset_exefs + sizeof(ExeFsHeader) + file->offset; templates[n].size = file->size; templates[n].keyslot = 0xFF; // needs to be handled @@ -345,8 +345,6 @@ u32 InitVGameDrive(void) { // prerequisite: game file mounted as image if (!BuildVGameNcchDir()) return 0; base_vdir = VDIR_NCCH; offset_ncch = 0; - offset_exefs = ncch->offset_exefs * NCCH_MEDIA_UNIT; - offset_romfs = ncch->offset_romfs * NCCH_MEDIA_UNIT; } else return 0; // not a mounted game file vgame_type = type;