Fix: detecting CDN/NUS type 2

This commit is contained in:
d0k3 2018-02-02 19:27:38 +01:00
parent 144ade92f8
commit a2bbcef1a0

View File

@ -118,6 +118,7 @@ u64 IdentifyFileType(const char* path) {
} else if (ext && ((strncasecmp(ext, "cdn", 4) == 0) || (strncasecmp(ext, "nus", 4) == 0))) { } else if (ext && ((strncasecmp(ext, "cdn", 4) == 0) || (strncasecmp(ext, "nus", 4) == 0))) {
char path_cetk[256]; char path_cetk[256];
char* ext_cetk = path_cetk + (ext - path); char* ext_cetk = path_cetk + (ext - path);
strncpy(path_cetk, path, 256);
strncpy(ext_cetk, "cetk", 5); strncpy(ext_cetk, "cetk", 5);
if (FileGetSize(path_cetk) > 0) if (FileGetSize(path_cetk) > 0)
return GAME_NUSCDN; // NUS/CDN type 2 return GAME_NUSCDN; // NUS/CDN type 2