From dd181129059ac03eba89556b8f3a1fa5d8119705 Mon Sep 17 00:00:00 2001 From: gibbed Date: Mon, 20 Jun 2016 12:53:07 -0500 Subject: [PATCH] Assert the CPU index on set. --- src/xenia/kernel/xthread.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/xenia/kernel/xthread.cc b/src/xenia/kernel/xthread.cc index 7e00efb4b..c269c1806 100644 --- a/src/xenia/kernel/xthread.cc +++ b/src/xenia/kernel/xthread.cc @@ -704,6 +704,7 @@ uint32_t XThread::active_cpu() const { } void XThread::SetActiveCpu(uint32_t cpu_index) { + assert_true(cpu_index < 6); uint8_t* pcr = memory()->TranslateVirtual(pcr_address_); xe::store_and_swap(pcr + 0x10C, cpu_index); }