From c04b476d301cdbbd978f9dcc2df5d9e7ba32a82d Mon Sep 17 00:00:00 2001 From: GaryOderNichts <12049776+GaryOderNichts@users.noreply.github.com> Date: Mon, 27 Nov 2023 01:54:25 +0100 Subject: [PATCH] GDBStub: Fix checkSum string to int conversion --- src/Cafe/HW/Espresso/Debugger/GDBStub.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Cafe/HW/Espresso/Debugger/GDBStub.cpp b/src/Cafe/HW/Espresso/Debugger/GDBStub.cpp index e934e55dc..c83085948 100644 --- a/src/Cafe/HW/Espresso/Debugger/GDBStub.cpp +++ b/src/Cafe/HW/Espresso/Debugger/GDBStub.cpp @@ -356,7 +356,7 @@ void GDBServer::ThreadFunc() } char checkSumStr[2]; receiveMessage(checkSumStr, 2); - uint32_t checkSum = std::stoi(checkSumStr, nullptr, 16); + uint32_t checkSum = std::stoi(std::string(checkSumStr, sizeof(checkSumStr)), nullptr, 16); assert((checkedSum & 0xFF) == checkSum); HandleCommand(message);