[Kernel] Fixed invalid thread pointer in KeEnableFpuExceptions
This commit is contained in:
@@ -24,7 +24,8 @@ void KeEnableFpuExceptions_entry(
|
|||||||
// TODO(benvanik): can we do anything about exceptions?
|
// TODO(benvanik): can we do anything about exceptions?
|
||||||
// theres a lot more thats supposed to happen here, the floating point state has to be saved to kthread, the irql changes, the machine state register is changed to enable exceptions
|
// theres a lot more thats supposed to happen here, the floating point state has to be saved to kthread, the irql changes, the machine state register is changed to enable exceptions
|
||||||
|
|
||||||
X_KTHREAD* kthread = ctx->TranslateVirtualGPR<X_KTHREAD*>(ctx->r[13]);
|
X_KTHREAD* kthread = ctx->TranslateVirtual<X_KTHREAD*>(
|
||||||
|
ctx->TranslateVirtualGPR<X_KPCR*>(ctx->r[13])->current_thread);
|
||||||
kthread->fpu_exceptions_on = static_cast<uint32_t>(ctx->r[3]) != 0;
|
kthread->fpu_exceptions_on = static_cast<uint32_t>(ctx->r[3]) != 0;
|
||||||
}
|
}
|
||||||
DECLARE_XBOXKRNL_EXPORT1(KeEnableFpuExceptions, kNone, kStub);
|
DECLARE_XBOXKRNL_EXPORT1(KeEnableFpuExceptions, kNone, kStub);
|
||||||
|
|||||||
Reference in New Issue
Block a user