Assert the CPU index on set.

This commit is contained in:
gibbed 2016-06-20 12:53:07 -05:00
parent 27610989a2
commit dd18112905
1 changed files with 1 additions and 0 deletions

View File

@ -704,6 +704,7 @@ uint32_t XThread::active_cpu() const {
} }
void XThread::SetActiveCpu(uint32_t cpu_index) { void XThread::SetActiveCpu(uint32_t cpu_index) {
assert_true(cpu_index < 6);
uint8_t* pcr = memory()->TranslateVirtual(pcr_address_); uint8_t* pcr = memory()->TranslateVirtual(pcr_address_);
xe::store_and_swap<uint8_t>(pcr + 0x10C, cpu_index); xe::store_and_swap<uint8_t>(pcr + 0x10C, cpu_index);
} }