Fix size handling in sceKernelReferTlsplStatus().

This commit is contained in:
Unknown W. Brackets committed 2015-02-21 15:50:16 -08:00
1 parent baca1ab901
commit abd03bd597
1 file changed
+2 -3
+2 -3
View File
@@ -2196,7 +2196,6 @@ int sceKernelFreeTlspl(SceUID uid)
return error;
}
// Parameters are an educated guess.
int sceKernelReferTlsplStatus(SceUID uid, u32 infoPtr)
{
DEBUG_LOG(SCEKERNEL, "sceKernelReferTlsplStatus(%08x, %08x)", uid, infoPtr);
@@ -2204,8 +2203,8 @@ int sceKernelReferTlsplStatus(SceUID uid, u32 infoPtr)
TLSPL *tls = kernelObjects.Get<TLSPL>(uid, error);
if (tls)
{
// TODO: Check size.
Memory::WriteStruct(infoPtr, &tls->ntls);
if (Memory::Read_U32(infoPtr) != 0)
Memory::WriteStruct(infoPtr, &tls->ntls);
return 0;
}
else