License isn't always needed, fixes access violation

This commit is contained in:
Raul Tambre 2014-08-13 15:25:13 +03:00
parent 36ab30d3e9
commit 8f4d8f82ed
1 changed files with 8 additions and 4 deletions

View File

@ -36,13 +36,17 @@ int sceNpDrmIsAvailable(u32 k_licensee_addr, u32 drm_path_addr)
return CELL_ENOENT;
}
std::string k_licensee_str;
std::string k_licensee_str = "0";
u8 k_licensee[0x10];
for(int i = 0; i < 0x10; i++)
if (k_licensee_addr)
{
for (int i = 0; i < 0x10; i++)
{
k_licensee[i] = Memory.Read8(k_licensee_addr + i);
k_licensee_str += fmt::Format("%02x", k_licensee[i]);
}
}
sceNp->Warning("sceNpDrmIsAvailable: Found DRM license file at %s", drm_path.c_str());
sceNp->Warning("sceNpDrmIsAvailable: Using k_licensee 0x%s", k_licensee_str.c_str());