mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-09-03 11:15:20 +02:00
Warning fixes, prevent a possible (but unlikely) crash
This commit is contained in:
@@ -1140,9 +1140,15 @@ void sceKernelCheckThreadStack()
|
||||
{
|
||||
u32 error;
|
||||
Thread *t = kernelObjects.Get<Thread>(__KernelGetCurThread(), error);
|
||||
u32 diff = abs((long)((s64)t->stackBlock - (s64)currentMIPS->r[MIPS_REG_SP]));
|
||||
ERROR_LOG(HLE, "%i=sceKernelCheckThreadStack()", diff);
|
||||
RETURN(diff); //Blatant lie
|
||||
if (t) {
|
||||
u32 diff = abs((long)((s64)t->stackBlock - (s64)currentMIPS->r[MIPS_REG_SP]));
|
||||
WARN_LOG(HLE, "%i=sceKernelCheckThreadStack()", diff);
|
||||
RETURN(diff);
|
||||
} else {
|
||||
// WTF?
|
||||
ERROR_LOG(HLE, "sceKernelCheckThreadStack() - not on thread");
|
||||
RETURN(-1);
|
||||
}
|
||||
}
|
||||
|
||||
void ThreadContext::reset()
|
||||
|
||||
Reference in New Issue
Block a user