From 5047c4d083d0cb939200f29b5554dce697847998 Mon Sep 17 00:00:00 2001 From: GaryOderNichts <12049776+GaryOderNichts@users.noreply.github.com> Date: Mon, 27 Nov 2023 12:21:52 +0100 Subject: [PATCH] GDBStub: Fix checkSum string to int conversion (#1029) --- 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 e934e55d..c8308594 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);