diff --git a/app/src/main/cpp/switch/hw/cpu.cpp b/app/src/main/cpp/switch/hw/cpu.cpp index d5fce411..a794c3c4 100644 --- a/app/src/main/cpp/switch/hw/cpu.cpp +++ b/app/src/main/cpp/switch/hw/cpu.cpp @@ -41,11 +41,11 @@ namespace lightSwitch::hw { auto instr_mrs = reinterpret_cast(address + iter); if (instr_svc->verify()) { // syslog(LOG_WARNING, "Found SVC call: 0x%X, At location 0x%X", instr_svc->value, ((uint64_t)address)+iter); - instr::brk brk(reinterpret_cast(instr_svc->value)); + instr::brk brk(static_cast(instr_svc->value)); address[iter] = *reinterpret_cast(&brk); } else if (instr_mrs->verify() && instr_mrs->Sreg == constant::tpidrro_el0) { // syslog(LOG_WARNING, "Found MRS call: 0x%X, At location 0x%X", instr_mrs->Xt, ((uint64_t)address)+iter); - instr::brk brk(reinterpret_cast(constant::svc_last + 1 + instr_mrs->Xt)); + instr::brk brk(static_cast(constant::svc_last + 1 + instr_mrs->Xt)); address[iter] = *reinterpret_cast(&brk); } } @@ -66,7 +66,7 @@ namespace lightSwitch::hw { auto instr = reinterpret_cast(ReadMemory(regs.pc)); if (instr->verify()) { if (instr->value <= constant::svc_last) { - svc_handler(reinterpret_cast(instr->value), device); + svc_handler(static_cast(instr->value), device); syslog(LOG_ERR, "SVC has been called 0x%X", instr->value); if (stop) break; } else if (instr->value > constant::svc_last && instr->value <= constant::svc_last + constant::num_regs) {