Skip to content

Commit

Permalink
GDBStub: Fix checkSum string to int conversion (#1029)
Browse files Browse the repository at this point in the history
  • Loading branch information
GaryOderNichts authored Nov 27, 2023
1 parent f3c95f7 commit 5047c4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Cafe/HW/Espresso/Debugger/GDBStub.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 5047c4d

Please sign in to comment.