diff --git a/Core/HLE/sceKernelModule.cpp b/Core/HLE/sceKernelModule.cpp index 3fa3bfa78e..b67620cae6 100644 --- a/Core/HLE/sceKernelModule.cpp +++ b/Core/HLE/sceKernelModule.cpp @@ -1056,7 +1056,7 @@ Module *__KernelLoadELFFromPtr(const u8 *ptr, u32 loadAddress, std::string *erro continue; } - u32_le variableCount = ent->size <= 4 ? ent->vcount : std::max((u32)ent->vcount , (u32)ent->vcountNew); + u32 variableCount = ent->size <= 4 ? ent->vcount : std::max((u32)ent->vcount , (u32)ent->vcountNew); const char *name; if (Memory::IsValidAddress(ent->name)) { name = Memory::GetCharPointer(ent->name); diff --git a/Core/HLE/sceKernelThread.cpp b/Core/HLE/sceKernelThread.cpp index 0d84df033e..f9ff964c84 100644 --- a/Core/HLE/sceKernelThread.cpp +++ b/Core/HLE/sceKernelThread.cpp @@ -1083,7 +1083,8 @@ bool __KernelCheckResumeThreadEnd(Thread *t, SceUID waitingThreadID, u32 &error, s64 cyclesLeft = CoreTiming::UnscheduleEvent(eventThreadEndTimeout, waitingThreadID); if (timeoutPtr != 0) Memory::Write_U32((u32) cyclesToUs(cyclesLeft), timeoutPtr); - __KernelResumeThreadFromWait(waitingThreadID, t->nt.exitStatus); + s32 exitStatus = t->nt.exitStatus; + __KernelResumeThreadFromWait(waitingThreadID, exitStatus); return true; } @@ -3325,7 +3326,7 @@ void __KernelCallAddress(Thread *thread, u32 entryPoint, Action *afterAction, co after->chainedAction = afterAction; after->threadID = thread->GetUID(); after->status = thread->nt.status; - after->waitType = thread->nt.waitType; + after->waitType = (WaitType)(u32)thread->nt.waitType; after->waitID = thread->nt.waitID; after->waitInfo = thread->waitInfo; after->isProcessingCallbacks = thread->isProcessingCallbacks; @@ -3702,7 +3703,7 @@ std::vector GetThreadsInfo() info.initialStack = t->nt.initialStack; info.stackSize = (u32)t->nt.stackSize; info.priority = t->nt.currentPriority; - info.waitType = t->nt.waitType; + info.waitType = (WaitType)(u32)t->nt.waitType; if(*iter == currentThread) info.curPC = currentMIPS->pc; else