GDBStub: Fix checkSum string to int conversion (#1029)

This commit is contained in:
GaryOderNichts 2023-11-27 12:21:52 +01:00 committed by GitHub
parent f3c95f72e7
commit 5047c4d083
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);