Add [[unlikely]] to get ahead of the inevitable PR review comment

This commit is contained in:
kalaposfos13 2025-07-16 10:59:54 +02:00
parent 8b12d2387f
commit 33f26cac62

View File

@ -753,7 +753,8 @@ static bool PatchesIllegalInstructionHandler(void* context) {
ZydisDecodedOperand operands[ZYDIS_MAX_OPERAND_COUNT];
const auto status =
Common::Decoder::Instance()->decodeInstruction(instruction, operands, code_address);
if (ZYAN_SUCCESS(status) && instruction.mnemonic == ZydisMnemonic::ZYDIS_MNEMONIC_UD2) {
if (ZYAN_SUCCESS(status) && instruction.mnemonic == ZydisMnemonic::ZYDIS_MNEMONIC_UD2)
[[unlikely]] {
UNREACHABLE_MSG("ud2 at code address {:#x}", (u64)code_address);
}
LOG_ERROR(Core, "Failed to patch address {:x} -- mnemonic: {}", (u64)code_address,