creport: pass user break result directly

This commit is contained in:
Michael Scire 2019-07-12 15:44:59 -07:00 committed by SciresM
parent 227a1d938d
commit 803e91a8c4

View file

@ -251,13 +251,8 @@ namespace sts::creport {
this->result = ResultCreportUserBreak; this->result = ResultCreportUserBreak;
/* Try to parse out the user break result. */ /* Try to parse out the user break result. */
if (GetRuntimeFirmwareVersion() >= FirmwareVersion_500) { if (GetRuntimeFirmwareVersion() >= FirmwareVersion_500) {
Result user_result = ResultSuccess;
if (IsAddressReadable(this->debug_handle, d.info.exception.specific.user_break.address, sizeof(user_result))) { if (IsAddressReadable(this->debug_handle, d.info.exception.specific.user_break.address, sizeof(user_result))) {
svcReadDebugProcessMemory(&user_result, this->debug_handle, d.info.exception.specific.user_break.address, sizeof(user_result)); svcReadDebugProcessMemory(&this->result, this->debug_handle, d.info.exception.specific.user_break.address, sizeof(this->result));
}
/* Only copy over the user result if it gives us information (as by default nnSdk uses the success code, which is confusing). */
if (R_FAILED(user_result)) {
this->result = user_result;
} }
} }
break; break;