From a2bbcef1a0a50e7bed5f5325f33b47232c8e5a3a Mon Sep 17 00:00:00 2001 From: d0k3 Date: Fri, 2 Feb 2018 19:27:38 +0100 Subject: [PATCH] Fix: detecting CDN/NUS type 2 --- arm9/source/filesys/filetype.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arm9/source/filesys/filetype.c b/arm9/source/filesys/filetype.c index 2e8760b..2100507 100644 --- a/arm9/source/filesys/filetype.c +++ b/arm9/source/filesys/filetype.c @@ -118,6 +118,7 @@ u64 IdentifyFileType(const char* path) { } else if (ext && ((strncasecmp(ext, "cdn", 4) == 0) || (strncasecmp(ext, "nus", 4) == 0))) { char path_cetk[256]; char* ext_cetk = path_cetk + (ext - path); + strncpy(path_cetk, path, 256); strncpy(ext_cetk, "cetk", 5); if (FileGetSize(path_cetk) > 0) return GAME_NUSCDN; // NUS/CDN type 2