mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-19 09:19:05 +02:00
Warning fixes, prevent a possible (but unlikely) crash
This commit is contained in:
1 parent
41ea4ff358
commit
972e4ea4e4
4 files changed
+14
-8
No files matched your search
@@ -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