From f6262bd048185bac26d41c144afe1762795c0374 Mon Sep 17 00:00:00 2001 From: MegaMech Date: Mon, 3 Jun 2024 22:19:40 -0600 Subject: [PATCH] Print unhandeled opcodes as uint8_t (#633) * Update gfx_pc.cpp * Update gfx_pc.cpp --- src/graphic/Fast3D/gfx_pc.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/graphic/Fast3D/gfx_pc.cpp b/src/graphic/Fast3D/gfx_pc.cpp index 055512f6c..f8ac8289f 100644 --- a/src/graphic/Fast3D/gfx_pc.cpp +++ b/src/graphic/Fast3D/gfx_pc.cpp @@ -3828,7 +3828,8 @@ const char* GfxGetOpcodeName(int8_t opcode) { if (ucode_handlers[ucode_handler_index]->contains(opcode)) { return ucode_handlers[ucode_handler_index]->at(opcode).first; } else { - SPDLOG_CRITICAL("Unhandled OP code: 0x{:X}, for loaded ucode: {}", opcode, (uint32_t)ucode_handler_index); + SPDLOG_CRITICAL("Unhandled OP code: 0x{:X}, for loaded ucode: {}", (uint8_t)opcode, + (uint32_t)ucode_handler_index); return nullptr; } } @@ -3868,7 +3869,8 @@ static void gfx_step() { return; } } else { - SPDLOG_CRITICAL("Unhandled OP code: 0x{:X}, for loaded ucode: {}", opcode, (uint32_t)ucode_handler_index); + SPDLOG_CRITICAL("Unhandled OP code: 0x{:X}, for loaded ucode: {}", (uint8_t)opcode, + (uint32_t)ucode_handler_index); } }